@rockcarver/frodo-cli 0.18.0 → 0.18.2-0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -1
- package/esm/cli/admin/admin-add-autoid-static-user-mapping.js +3 -2
- package/esm/cli/admin/admin-add-autoid-static-user-mapping.js.map +1 -1
- package/esm/cli/admin/admin-create-oauth2-client-with-admin-privileges.js +5 -4
- package/esm/cli/admin/admin-create-oauth2-client-with-admin-privileges.js.map +1 -1
- package/esm/cli/admin/admin-get-access-token.js +3 -2
- package/esm/cli/admin/admin-get-access-token.js.map +1 -1
- package/esm/cli/admin/admin-grant-oauth2-client-admin-privileges.js +3 -2
- package/esm/cli/admin/admin-grant-oauth2-client-admin-privileges.js.map +1 -1
- package/esm/cli/admin/admin-hide-generic-extension-attributes.js +3 -2
- package/esm/cli/admin/admin-hide-generic-extension-attributes.js.map +1 -1
- package/esm/cli/admin/admin-list-oauth2-clients-with-admin-privileges.js +3 -2
- package/esm/cli/admin/admin-list-oauth2-clients-with-admin-privileges.js.map +1 -1
- package/esm/cli/admin/admin-list-oauth2-clients-with-custom-privileges.js +3 -2
- package/esm/cli/admin/admin-list-oauth2-clients-with-custom-privileges.js.map +1 -1
- package/esm/cli/admin/admin-list-static-user-mappings.js +3 -2
- package/esm/cli/admin/admin-list-static-user-mappings.js.map +1 -1
- package/esm/cli/admin/admin-remove-static-user-mapping.js +3 -2
- package/esm/cli/admin/admin-remove-static-user-mapping.js.map +1 -1
- package/esm/cli/admin/admin-repair-org-model.js +3 -2
- package/esm/cli/admin/admin-repair-org-model.js.map +1 -1
- package/esm/cli/admin/admin-revoke-oauth2-client-admin-privileges.js +3 -2
- package/esm/cli/admin/admin-revoke-oauth2-client-admin-privileges.js.map +1 -1
- package/esm/cli/admin/admin-show-generic-extension-attributes.js +3 -2
- package/esm/cli/admin/admin-show-generic-extension-attributes.js.map +1 -1
- package/esm/cli/app/app-export.js +5 -4
- package/esm/cli/app/app-export.js.map +1 -1
- package/esm/cli/app/app-import.js +2 -1
- package/esm/cli/app/app-import.js.map +1 -1
- package/esm/cli/app/app-list.js +2 -1
- package/esm/cli/app/app-list.js.map +1 -1
- package/esm/cli/cmd_common.js +4 -4
- package/esm/cli/cmd_common.js.map +1 -1
- package/esm/cli/email/email-template-export.js +5 -4
- package/esm/cli/email/email-template-export.js.map +1 -1
- package/esm/cli/email/email-template-import.js +6 -5
- package/esm/cli/email/email-template-import.js.map +1 -1
- package/esm/cli/email/email-template-list.js +2 -1
- package/esm/cli/email/email-template-list.js.map +1 -1
- package/esm/cli/esv/esv-secret-create.js +2 -1
- package/esm/cli/esv/esv-secret-create.js.map +1 -1
- package/esm/cli/esv/esv-secret-delete.js +4 -3
- package/esm/cli/esv/esv-secret-delete.js.map +1 -1
- package/esm/cli/esv/esv-secret-describe.js +2 -1
- package/esm/cli/esv/esv-secret-describe.js.map +1 -1
- package/esm/cli/esv/esv-secret-list.js +2 -1
- package/esm/cli/esv/esv-secret-list.js.map +1 -1
- package/esm/cli/esv/esv-secret-set.js +2 -1
- package/esm/cli/esv/esv-secret-set.js.map +1 -1
- package/esm/cli/esv/esv-secret-version-activate.js +3 -2
- package/esm/cli/esv/esv-secret-version-activate.js.map +1 -1
- package/esm/cli/esv/esv-secret-version-create.js +2 -1
- package/esm/cli/esv/esv-secret-version-create.js.map +1 -1
- package/esm/cli/esv/esv-secret-version-deactivate.js +3 -2
- package/esm/cli/esv/esv-secret-version-deactivate.js.map +1 -1
- package/esm/cli/esv/esv-secret-version-delete.js +4 -3
- package/esm/cli/esv/esv-secret-version-delete.js.map +1 -1
- package/esm/cli/esv/esv-secret-version-list.js +2 -1
- package/esm/cli/esv/esv-secret-version-list.js.map +1 -1
- package/esm/cli/esv/esv-variable-create.js +2 -1
- package/esm/cli/esv/esv-variable-create.js.map +1 -1
- package/esm/cli/esv/esv-variable-delete.js +4 -3
- package/esm/cli/esv/esv-variable-delete.js.map +1 -1
- package/esm/cli/esv/esv-variable-describe.js +2 -1
- package/esm/cli/esv/esv-variable-describe.js.map +1 -1
- package/esm/cli/esv/esv-variable-list.js +2 -1
- package/esm/cli/esv/esv-variable-list.js.map +1 -1
- package/esm/cli/esv/esv-variable-set.js +4 -3
- package/esm/cli/esv/esv-variable-set.js.map +1 -1
- package/esm/cli/idm/idm-count.js +2 -1
- package/esm/cli/idm/idm-count.js.map +1 -1
- package/esm/cli/idm/idm-export.js +5 -4
- package/esm/cli/idm/idm-export.js.map +1 -1
- package/esm/cli/idm/idm-list.js +3 -2
- package/esm/cli/idm/idm-list.js.map +1 -1
- package/esm/cli/idp/idp-export.js +6 -5
- package/esm/cli/idp/idp-export.js.map +1 -1
- package/esm/cli/idp/idp-import.js +7 -6
- package/esm/cli/idp/idp-import.js.map +1 -1
- package/esm/cli/idp/idp-list.js +3 -2
- package/esm/cli/idp/idp-list.js.map +1 -1
- package/esm/cli/info/info.js +7 -6
- package/esm/cli/info/info.js.map +1 -1
- package/esm/cli/journey/journey-delete.e2e.test_.js.map +1 -1
- package/esm/cli/journey/journey-delete.js +5 -4
- package/esm/cli/journey/journey-delete.js.map +1 -1
- package/esm/cli/journey/journey-describe.js.map +1 -1
- package/esm/cli/journey/journey-disable.js +3 -3
- package/esm/cli/journey/journey-disable.js.map +1 -1
- package/esm/cli/journey/journey-enable.js +3 -3
- package/esm/cli/journey/journey-enable.js.map +1 -1
- package/esm/cli/journey/journey-export.js +15 -18
- package/esm/cli/journey/journey-export.js.map +1 -1
- package/esm/cli/journey/journey-import.js +16 -22
- package/esm/cli/journey/journey-import.js.map +1 -1
- package/esm/cli/journey/journey-list.e2e.test_.js.map +1 -1
- package/esm/cli/journey/journey-list.js +5 -6
- package/esm/cli/journey/journey-list.js.map +1 -1
- package/esm/cli/journey/journey-prune.js +4 -3
- package/esm/cli/journey/journey-prune.js.map +1 -1
- package/esm/cli/journey/journey.js.map +1 -1
- package/esm/cli/logging/logs-fetch.js +5 -5
- package/esm/cli/logging/logs-fetch.js.map +1 -1
- package/esm/cli/logging/logs-list.js +10 -9
- package/esm/cli/logging/logs-list.js.map +1 -1
- package/esm/cli/logging/logs-tail.js +5 -4
- package/esm/cli/logging/logs-tail.js.map +1 -1
- package/esm/cli/logging/logs.js.map +1 -1
- package/esm/cli/realm/realm-add-custom-domain.js +3 -2
- package/esm/cli/realm/realm-add-custom-domain.js.map +1 -1
- package/esm/cli/realm/realm-describe.js +3 -2
- package/esm/cli/realm/realm-describe.js.map +1 -1
- package/esm/cli/realm/realm-list.js +3 -2
- package/esm/cli/realm/realm-list.js.map +1 -1
- package/esm/cli/realm/realm-remove-custom-domain.js +3 -2
- package/esm/cli/realm/realm-remove-custom-domain.js.map +1 -1
- package/esm/cli/saml/saml-cot-export.js +6 -5
- package/esm/cli/saml/saml-cot-export.js.map +1 -1
- package/esm/cli/saml/saml-cot-import.js +7 -6
- package/esm/cli/saml/saml-cot-import.js.map +1 -1
- package/esm/cli/saml/saml-cot-list.js +3 -2
- package/esm/cli/saml/saml-cot-list.js.map +1 -1
- package/esm/cli/saml/saml-describe.js +3 -2
- package/esm/cli/saml/saml-describe.js.map +1 -1
- package/esm/cli/saml/saml-export.js +6 -5
- package/esm/cli/saml/saml-export.js.map +1 -1
- package/esm/cli/saml/saml-import.js +7 -6
- package/esm/cli/saml/saml-import.js.map +1 -1
- package/esm/cli/saml/saml-list.js +3 -2
- package/esm/cli/saml/saml-list.js.map +1 -1
- package/esm/cli/saml/saml-metadata-export.js +5 -4
- package/esm/cli/saml/saml-metadata-export.js.map +1 -1
- package/esm/cli/script/script-delete.js +1 -1
- package/esm/cli/script/script-delete.js.map +1 -1
- package/esm/cli/script/script-describe.js +1 -1
- package/esm/cli/script/script-describe.js.map +1 -1
- package/esm/cli/script/script-export.js +6 -5
- package/esm/cli/script/script-export.js.map +1 -1
- package/esm/cli/script/script-import.js +3 -2
- package/esm/cli/script/script-import.js.map +1 -1
- package/esm/cli/script/script-list.js +3 -2
- package/esm/cli/script/script-list.js.map +1 -1
- package/esm/cli/theme/theme-delete.e2e.test_.js.map +1 -1
- package/esm/cli/theme/theme-delete.js +6 -5
- package/esm/cli/theme/theme-delete.js.map +1 -1
- package/esm/cli/theme/theme-export.js +7 -6
- package/esm/cli/theme/theme-export.js.map +1 -1
- package/esm/cli/theme/theme-import.js +8 -7
- package/esm/cli/theme/theme-import.js.map +1 -1
- package/esm/cli/theme/theme-list.e2e.test_.js.map +1 -1
- package/esm/cli/theme/theme-list.js +3 -2
- package/esm/cli/theme/theme-list.js.map +1 -1
- package/esm/ops/JourneyOps.js +325 -2
- package/esm/ops/JourneyOps.js.map +1 -1
- package/esm/ops/NodeOps.js.map +1 -1
- package/esm/ops/Saml2Ops.js.map +1 -1
- package/esm/ops/ScriptOps.js.map +1 -1
- package/esm/utils/Config.js.map +1 -1
- package/esm/utils/Console.js +1 -0
- package/esm/utils/Console.js.map +1 -1
- package/esm/utils/Version.js +1 -1
- package/esm/utils/Version.js.map +1 -1
- package/package.json +9 -3
package/esm/cli/idm/idm-count.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Command, Option } from 'commander';
|
|
2
2
|
import { Authenticate, Idm, state } from '@rockcarver/frodo-lib';
|
|
3
3
|
import * as common from '../cmd_common.js';
|
|
4
|
+
import { printMessage } from '../../utils/Console.js';
|
|
4
5
|
const {
|
|
5
6
|
getTokens
|
|
6
7
|
} = Authenticate;
|
|
@@ -18,7 +19,7 @@ async (host, realm, user, password, options) => {
|
|
|
18
19
|
state.default.session.setAllowInsecureConnection(options.insecure);
|
|
19
20
|
|
|
20
21
|
if (await getTokens()) {
|
|
21
|
-
|
|
22
|
+
printMessage(`Counting managed ${options.managedObject} objects...`);
|
|
22
23
|
countManagedObjects(options.managedObject);
|
|
23
24
|
}
|
|
24
25
|
} // end command logic inside action handler
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"idm-count.js","names":["Command","Option","Authenticate","Idm","state","common","getTokens","countManagedObjects","program","description","helpOption","showHelpAfterError","addArgument","hostArgumentM","realmArgument","userArgument","passwordArgument","addOption","insecureOption","action","host","realm","user","password","options","default","session","setTenant","setRealm","setUsername","setPassword","setDeploymentType","type","setAllowInsecureConnection","insecure","
|
|
1
|
+
{"version":3,"file":"idm-count.js","names":["Command","Option","Authenticate","Idm","state","common","printMessage","getTokens","countManagedObjects","program","description","helpOption","showHelpAfterError","addArgument","hostArgumentM","realmArgument","userArgument","passwordArgument","addOption","insecureOption","action","host","realm","user","password","options","default","session","setTenant","setRealm","setUsername","setPassword","setDeploymentType","type","setAllowInsecureConnection","insecure","managedObject","parse"],"sources":["cli/idm/idm-count.ts"],"sourcesContent":["import { Command, Option } from 'commander';\nimport { Authenticate, Idm, state } from '@rockcarver/frodo-lib';\nimport * as common from '../cmd_common.js';\nimport { printMessage } from '../../utils/Console.js';\n\nconst { getTokens } = Authenticate;\nconst { countManagedObjects } = Idm;\n\nconst program = new Command('frodo idm count');\n\nprogram\n .description('Count managed objects.')\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.insecureOption)\n .addOption(\n new Option(\n '-m, --managed-object <type>',\n 'Type of managed object to count. E.g. \"alpha_user\", \"alpha_role\", \"user\", \"role\".'\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(`Counting managed ${options.managedObject} objects...`);\n countManagedObjects(options.managedObject);\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,GAAvB,EAA4BC,KAA5B,QAAyC,uBAAzC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BAAmB,CAACiB,OAAO,CAACW,aAAT,CAAnB;EACD;AACF,CA5BL,CA6BI;AA7BJ;AAgCA3B,OAAO,CAAC4B,KAAR"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Command, Option } from 'commander';
|
|
2
2
|
import { Authenticate, Idm, state } from '@rockcarver/frodo-lib';
|
|
3
3
|
import * as common from '../cmd_common.js';
|
|
4
|
+
import { printMessage } from '../../utils/Console.js';
|
|
4
5
|
const {
|
|
5
6
|
getTokens
|
|
6
7
|
} = Authenticate;
|
|
@@ -22,19 +23,19 @@ async (host, realm, user, password, options) => {
|
|
|
22
23
|
if (await getTokens()) {
|
|
23
24
|
// export by id/name
|
|
24
25
|
if (options.name) {
|
|
25
|
-
|
|
26
|
+
printMessage(`Exporting object "${options.name}" from realm "${state.default.session.getRealm()}"...`);
|
|
26
27
|
exportConfigEntity(options.name, options.file);
|
|
27
28
|
} // --all-separate -A
|
|
28
29
|
else if (options.allSeparate && options.directory && options.entitiesFile && options.envFile) {
|
|
29
|
-
|
|
30
|
+
printMessage(`Exporting IDM configuration objects specified in ${options.entitiesFile} into separate files in ${options.directory} using ${options.envFile} for variable replacement...`);
|
|
30
31
|
exportAllConfigEntities(options.directory, options.entitiesFile, options.envFile);
|
|
31
32
|
} // --all-separate -A without variable replacement
|
|
32
33
|
else if (options.allSeparate && options.directory) {
|
|
33
|
-
|
|
34
|
+
printMessage(`Exporting all IDM configuration objects into separate files in ${options.directory}...`);
|
|
34
35
|
exportAllRawConfigEntities(options.directory);
|
|
35
36
|
} // unrecognized combination of options or no options
|
|
36
37
|
else {
|
|
37
|
-
|
|
38
|
+
printMessage('Unrecognized combination of options or no options...', 'error');
|
|
38
39
|
program.help();
|
|
39
40
|
}
|
|
40
41
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"idm-export.js","names":["Command","Option","Authenticate","Idm","state","common","getTokens","exportAllConfigEntities","exportAllRawConfigEntities","exportConfigEntity","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","name","
|
|
1
|
+
{"version":3,"file":"idm-export.js","names":["Command","Option","Authenticate","Idm","state","common","printMessage","getTokens","exportAllConfigEntities","exportAllRawConfigEntities","exportConfigEntity","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","name","getRealm","file","allSeparate","directory","entitiesFile","envFile","help","parse"],"sources":["cli/idm/idm-export.ts"],"sourcesContent":["import { Command, Option } from 'commander';\nimport { Authenticate, Idm, state } from '@rockcarver/frodo-lib';\nimport * as common from '../cmd_common.js';\nimport { printMessage } from '../../utils/Console.js';\n\nconst { getTokens } = Authenticate;\nconst {\n exportAllConfigEntities,\n exportAllRawConfigEntities,\n exportConfigEntity,\n} = Idm;\n\nconst program = new Command('frodo idm export');\n\nprogram\n .description('Export IDM configuration objects.')\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 '-N, --name <name>',\n 'Config entity name. E.g. \"managed\", \"sync\", \"provisioner-<connector-name>\", etc.'\n )\n )\n .addOption(new Option('-f, --file [file]', 'Export file. Ignored with -A.'))\n .addOption(\n new Option(\n '-E, --entities-file [entities-file]',\n 'Name of the entity file. Ignored with -A.'\n )\n )\n .addOption(\n new Option(\n '-e, --env-file [envfile]',\n 'Name of the env file. Ignored with -A.'\n )\n )\n .addOption(\n new Option(\n '-a, --all',\n 'Export all IDM configuration objects into a single file in directory -D. Ignored with -N.'\n )\n )\n .addOption(\n new Option(\n '-A, --all-separate',\n 'Export all IDM configuration objects into separate JSON files in directory -D. Ignored with -N, and -a.'\n )\n )\n .addOption(\n new Option(\n '-D, --directory <directory>',\n 'Export directory. Required with and ignored without -a/-A.'\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 // export by id/name\n if (options.name) {\n printMessage(\n `Exporting object \"${\n options.name\n }\" from realm \"${state.default.session.getRealm()}\"...`\n );\n exportConfigEntity(options.name, options.file);\n }\n // --all-separate -A\n else if (\n options.allSeparate &&\n options.directory &&\n options.entitiesFile &&\n options.envFile\n ) {\n printMessage(\n `Exporting IDM configuration objects specified in ${options.entitiesFile} into separate files in ${options.directory} using ${options.envFile} for variable replacement...`\n );\n exportAllConfigEntities(\n options.directory,\n options.entitiesFile,\n options.envFile\n );\n }\n // --all-separate -A without variable replacement\n else if (options.allSeparate && options.directory) {\n printMessage(\n `Exporting all IDM configuration objects into separate files in ${options.directory}...`\n );\n exportAllRawConfigEntities(options.directory);\n }\n // unrecognized combination of options or no options\n else {\n printMessage(\n 'Unrecognized combination of options or no options...',\n 'error'\n );\n program.help();\n }\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,GAAvB,EAA4BC,KAA5B,QAAyC,uBAAzC;AACA,OAAO,KAAKC,MAAZ,MAAwB,kBAAxB;AACA,SAASC,YAAT,QAA6B,wBAA7B;AAEA,MAAM;EAAEC;AAAF,IAAgBL,YAAtB;AACA,MAAM;EACJM,uBADI;EAEJC,0BAFI;EAGJC;AAHI,IAIFP,GAJJ;AAMA,MAAMQ,OAAO,GAAG,IAAIX,OAAJ,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
1
1
|
import { Command } from 'commander';
|
|
2
2
|
import { Authenticate, Idm, state } from '@rockcarver/frodo-lib';
|
|
3
|
-
import * as common from '../cmd_common
|
|
3
|
+
import * as common from '../cmd_common';
|
|
4
|
+
import { printMessage } from '../../utils/Console';
|
|
4
5
|
const {
|
|
5
6
|
getTokens
|
|
6
7
|
} = Authenticate;
|
|
@@ -21,7 +22,7 @@ async (host, realm, user, password, options) => {
|
|
|
21
22
|
state.default.session.setAllowInsecureConnection(options.insecure);
|
|
22
23
|
|
|
23
24
|
if (await getTokens()) {
|
|
24
|
-
|
|
25
|
+
printMessage('Listing all IDM configuration objects...');
|
|
25
26
|
listAllConfigEntities();
|
|
26
27
|
}
|
|
27
28
|
} // end command logic inside action handler
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"idm-list.js","names":["Command","Authenticate","Idm","state","common","getTokens","listAllConfigEntities","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","
|
|
1
|
+
{"version":3,"file":"idm-list.js","names":["Command","Authenticate","Idm","state","common","printMessage","getTokens","listAllConfigEntities","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/idm/idm-list.ts"],"sourcesContent":["import { Command } from 'commander';\nimport { Authenticate, Idm, state } from '@rockcarver/frodo-lib';\nimport * as common from '../cmd_common';\nimport { printMessage } from '../../utils/Console';\n\nconst { getTokens } = Authenticate;\nconst { listAllConfigEntities } = Idm;\n\nconst program = new Command('frodo idm list');\n\nprogram\n .description('List IDM configuration objects.')\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('-l, --long', 'Long with all fields.').default(false, 'false')\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('Listing all IDM configuration objects...');\n listAllConfigEntities();\n }\n }\n // end command logic inside action handler\n );\n\nprogram.parse();\n"],"mappings":"AAAA,SAASA,OAAT,QAAwB,WAAxB;AACA,SAASC,YAAT,EAAuBC,GAAvB,EAA4BC,KAA5B,QAAyC,uBAAzC;AACA,OAAO,KAAKC,MAAZ,MAAwB,eAAxB;AACA,SAASC,YAAT,QAA6B,qBAA7B;AAEA,MAAM;EAAEC;AAAF,IAAgBL,YAAtB;AACA,MAAM;EAAEM;AAAF,IAA4BL,GAAlC;AAEA,MAAMM,OAAO,GAAG,IAAIR,OAAJ,CAAY,gBAAZ,CAAhB;AAEAQ,OAAO,CACJC,WADH,CACe,iCADf,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,EAUE;AACA;AACA;AAZF,CAaGC,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,CAAC,0CAAD,CAAZ;IACAE,qBAAqB;EACtB;AACF,CA1BL,CA2BI;AA3BJ;AA8BAC,OAAO,CAAC4B,KAAR"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Command, Option } from 'commander';
|
|
2
2
|
import { Authenticate, Idp, state } from '@rockcarver/frodo-lib';
|
|
3
|
-
import * as common from '../cmd_common
|
|
3
|
+
import * as common from '../cmd_common';
|
|
4
|
+
import { printMessage } from '../../utils/Console';
|
|
4
5
|
const {
|
|
5
6
|
getTokens
|
|
6
7
|
} = Authenticate;
|
|
@@ -22,19 +23,19 @@ async (host, realm, user, password, options) => {
|
|
|
22
23
|
if (await getTokens()) {
|
|
23
24
|
// export by id/name
|
|
24
25
|
if (options.idpId) {
|
|
25
|
-
|
|
26
|
+
printMessage(`Exporting provider "${options.idpId}" from realm "${state.default.session.getRealm()}"...`);
|
|
26
27
|
exportSocialProviderToFile(options.idpId, options.file);
|
|
27
28
|
} // --all -a
|
|
28
29
|
else if (options.all) {
|
|
29
|
-
|
|
30
|
+
printMessage('Exporting all providers to a single file...');
|
|
30
31
|
exportSocialProvidersToFile(options.file);
|
|
31
32
|
} // --all-separate -A
|
|
32
33
|
else if (options.allSeparate) {
|
|
33
|
-
|
|
34
|
+
printMessage('Exporting all providers to separate files...');
|
|
34
35
|
exportSocialProvidersToFiles();
|
|
35
36
|
} // unrecognized combination of options or no options
|
|
36
37
|
else {
|
|
37
|
-
|
|
38
|
+
printMessage('Unrecognized combination of options or no options...', 'error');
|
|
38
39
|
program.help();
|
|
39
40
|
}
|
|
40
41
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"idp-export.js","names":["Command","Option","Authenticate","Idp","state","common","getTokens","exportSocialProviderToFile","exportSocialProvidersToFile","exportSocialProvidersToFiles","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","idpId","
|
|
1
|
+
{"version":3,"file":"idp-export.js","names":["Command","Option","Authenticate","Idp","state","common","printMessage","getTokens","exportSocialProviderToFile","exportSocialProvidersToFile","exportSocialProvidersToFiles","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","idpId","getRealm","file","all","allSeparate","help","parse"],"sources":["cli/idp/idp-export.ts"],"sourcesContent":["import { Command, Option } from 'commander';\nimport { Authenticate, Idp, state } from '@rockcarver/frodo-lib';\nimport * as common from '../cmd_common';\nimport { printMessage } from '../../utils/Console';\n\nconst { getTokens } = Authenticate;\nconst {\n exportSocialProviderToFile,\n exportSocialProvidersToFile,\n exportSocialProvidersToFiles,\n} = Idp;\n\nconst program = new Command('frodo idp export');\n\nprogram\n .description('Export (social) identity providers.')\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 '-i, --idp-id <idp-id>',\n 'Id/name of a provider. If specified, -a and -A are ignored.'\n )\n )\n .addOption(\n new Option(\n '-f, --file [file]',\n 'Name of the file to write the exported provider(s) to. Ignored with -A.'\n )\n )\n .addOption(\n new Option(\n '-a, --all',\n 'Export all the providers in a realm to a single file. Ignored with -t and -i.'\n )\n )\n .addOption(\n new Option(\n '-A, --all-separate',\n 'Export all the providers in a realm as separate files <provider name>.idp.json. Ignored with -t, -i, and -a.'\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 // export by id/name\n if (options.idpId) {\n printMessage(\n `Exporting provider \"${\n options.idpId\n }\" from realm \"${state.default.session.getRealm()}\"...`\n );\n exportSocialProviderToFile(options.idpId, options.file);\n }\n // --all -a\n else if (options.all) {\n printMessage('Exporting all providers to a single file...');\n exportSocialProvidersToFile(options.file);\n }\n // --all-separate -A\n else if (options.allSeparate) {\n printMessage('Exporting all providers to separate files...');\n exportSocialProvidersToFiles();\n }\n // unrecognized combination of options or no options\n else {\n printMessage(\n 'Unrecognized combination of options or no options...',\n 'error'\n );\n program.help();\n }\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,GAAvB,EAA4BC,KAA5B,QAAyC,uBAAzC;AACA,OAAO,KAAKC,MAAZ,MAAwB,eAAxB;AACA,SAASC,YAAT,QAA6B,qBAA7B;AAEA,MAAM;EAAEC;AAAF,IAAgBL,YAAtB;AACA,MAAM;EACJM,0BADI;EAEJC,2BAFI;EAGJC;AAHI,IAIFP,GAJJ;AAMA,MAAMQ,OAAO,GAAG,IAAIX,OAAJ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IAAIqB,OAAO,CAACW,KAAZ,EAAmB;MACjBjC,YAAY,CACT,uBACCsB,OAAO,CAACW,KACT,iBAAgBnC,KAAK,CAACyB,OAAN,CAAcC,OAAd,CAAsBU,QAAtB,EAAiC,MAHxC,CAAZ;MAKAhC,0BAA0B,CAACoB,OAAO,CAACW,KAAT,EAAgBX,OAAO,CAACa,IAAxB,CAA1B;IACD,CAPD,CAQA;IARA,KASK,IAAIb,OAAO,CAACc,GAAZ,EAAiB;MACpBpC,YAAY,CAAC,6CAAD,CAAZ;MACAG,2BAA2B,CAACmB,OAAO,CAACa,IAAT,CAA3B;IACD,CAHI,CAIL;IAJK,KAKA,IAAIb,OAAO,CAACe,WAAZ,EAAyB;MAC5BrC,YAAY,CAAC,8CAAD,CAAZ;MACAI,4BAA4B;IAC7B,CAHI,CAIL;IAJK,KAKA;MACHJ,YAAY,CACV,sDADU,EAEV,OAFU,CAAZ;MAIAK,OAAO,CAACiC,IAAR;IACD;EACF;AACF,CAxEL,CAyEI;AAzEJ;AA4EAjC,OAAO,CAACkC,KAAR"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Command, Option } from 'commander';
|
|
2
2
|
import { Authenticate, Idp, state } from '@rockcarver/frodo-lib';
|
|
3
|
-
import * as common from '../cmd_common
|
|
3
|
+
import * as common from '../cmd_common';
|
|
4
|
+
import { printMessage } from '../../utils/Console';
|
|
4
5
|
const {
|
|
5
6
|
getTokens
|
|
6
7
|
} = Authenticate;
|
|
@@ -23,23 +24,23 @@ async (host, realm, user, password, options) => {
|
|
|
23
24
|
if (await getTokens()) {
|
|
24
25
|
// import by id
|
|
25
26
|
if (options.file && options.idpId) {
|
|
26
|
-
|
|
27
|
+
printMessage(`Importing provider "${options.idpId}" into realm "${state.default.session.getRealm()}"...`);
|
|
27
28
|
importSocialProviderFromFile(options.idpId, options.file);
|
|
28
29
|
} // --all -a
|
|
29
30
|
else if (options.all && options.file) {
|
|
30
|
-
|
|
31
|
+
printMessage(`Importing all providers from a single file (${options.file})...`);
|
|
31
32
|
importSocialProvidersFromFile(options.file);
|
|
32
33
|
} // --all-separate -A
|
|
33
34
|
else if (options.allSeparate && !options.file) {
|
|
34
|
-
|
|
35
|
+
printMessage('Importing all providers from separate files in current directory...');
|
|
35
36
|
importSocialProvidersFromFiles();
|
|
36
37
|
} // import first provider from file
|
|
37
38
|
else if (options.file) {
|
|
38
|
-
|
|
39
|
+
printMessage(`Importing first provider from file "${options.file}" into realm "${state.default.session.getRealm()}"...`);
|
|
39
40
|
importFirstSocialProviderFromFile(options.file);
|
|
40
41
|
} // unrecognized combination of options or no options
|
|
41
42
|
else {
|
|
42
|
-
|
|
43
|
+
printMessage('Unrecognized combination of options or no options...');
|
|
43
44
|
program.help();
|
|
44
45
|
}
|
|
45
46
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"idp-import.js","names":["Command","Option","Authenticate","Idp","state","common","getTokens","importSocialProviderFromFile","importFirstSocialProviderFromFile","importSocialProvidersFromFile","importSocialProvidersFromFiles","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","file","idpId","
|
|
1
|
+
{"version":3,"file":"idp-import.js","names":["Command","Option","Authenticate","Idp","state","common","printMessage","getTokens","importSocialProviderFromFile","importFirstSocialProviderFromFile","importSocialProvidersFromFile","importSocialProvidersFromFiles","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","file","idpId","getRealm","all","allSeparate","help","parse"],"sources":["cli/idp/idp-import.ts"],"sourcesContent":["import { Command, Option } from 'commander';\nimport { Authenticate, Idp, state } from '@rockcarver/frodo-lib';\nimport * as common from '../cmd_common';\nimport { printMessage } from '../../utils/Console';\n\nconst { getTokens } = Authenticate;\nconst {\n importSocialProviderFromFile,\n importFirstSocialProviderFromFile,\n importSocialProvidersFromFile,\n importSocialProvidersFromFiles,\n} = Idp;\n\nconst program = new Command('frodo idp import');\n\nprogram\n .description('Import (social) identity providers.')\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 '-i, --idp-id <id>',\n 'Provider id. If specified, -a and -A are ignored.'\n )\n )\n .addOption(\n new Option(\n '-f, --file <file>',\n 'Name of the file to import the provider(s) from.'\n )\n )\n .addOption(\n new Option(\n '-a, --all',\n 'Import all the providers from single file. Ignored with -t or -i.'\n )\n )\n .addOption(\n new Option(\n '-A, --all-separate',\n 'Import all the providers from separate files (*.json) in the current directory. Ignored with -t or -i or -a.'\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 // import by id\n if (options.file && options.idpId) {\n printMessage(\n `Importing provider \"${\n options.idpId\n }\" into realm \"${state.default.session.getRealm()}\"...`\n );\n importSocialProviderFromFile(options.idpId, options.file);\n }\n // --all -a\n else if (options.all && options.file) {\n printMessage(\n `Importing all providers from a single file (${options.file})...`\n );\n importSocialProvidersFromFile(options.file);\n }\n // --all-separate -A\n else if (options.allSeparate && !options.file) {\n printMessage(\n 'Importing all providers from separate files in current directory...'\n );\n importSocialProvidersFromFiles();\n }\n // import first provider from file\n else if (options.file) {\n printMessage(\n `Importing first provider from file \"${\n options.file\n }\" into realm \"${state.default.session.getRealm()}\"...`\n );\n importFirstSocialProviderFromFile(options.file);\n }\n // unrecognized combination of options or no options\n else {\n printMessage('Unrecognized combination of options or no options...');\n program.help();\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,GAAvB,EAA4BC,KAA5B,QAAyC,uBAAzC;AACA,OAAO,KAAKC,MAAZ,MAAwB,eAAxB;AACA,SAASC,YAAT,QAA6B,qBAA7B;AAEA,MAAM;EAAEC;AAAF,IAAgBL,YAAtB;AACA,MAAM;EACJM,4BADI;EAEJC,iCAFI;EAGJC,6BAHI;EAIJC;AAJI,IAKFR,GALJ;AAOA,MAAMS,OAAO,GAAG,IAAIZ,OAAJ,CAAY,kBAAZ,CAAhB;AAEAY,OAAO,CACJC,WADH,CACe,qCADf,EAEGC,UAFH,CAEc,YAFd,EAE4B,MAF5B,EAGGC,kBAHH,GAIGC,WAJH,CAIeX,MAAM,CAACY,aAJtB,EAKGD,WALH,CAKeX,MAAM,CAACa,aALtB,EAMGF,WANH,CAMeX,MAAM,CAACc,YANtB,EAOGH,WAPH,CAOeX,MAAM,CAACe,gBAPtB,EAQGC,SARH,CAQahB,MAAM,CAACiB,gBARpB,EASGD,SATH,CASahB,MAAM,CAACkB,cATpB,EAUGF,SAVH,CAWI,IAAIpB,MAAJ,CACE,mBADF,EAEE,mDAFF,CAXJ,EAgBGoB,SAhBH,CAiBI,IAAIpB,MAAJ,CACE,mBADF,EAEE,kDAFF,CAjBJ,EAsBGoB,SAtBH,CAuBI,IAAIpB,MAAJ,CACE,WADF,EAEE,mEAFF,CAvBJ,EA4BGoB,SA5BH,CA6BI,IAAIpB,MAAJ,CACE,oBADF,EAEE,8GAFF,CA7BJ,EAkCGuB,MAlCH,EAmCI;AACA,OAAOC,IAAP,EAAaC,KAAb,EAAoBC,IAApB,EAA0BC,QAA1B,EAAoCC,OAApC,KAAgD;EAC9CzB,KAAK,CAAC0B,OAAN,CAAcC,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W,QAAtB,EAAiC,MAHxC,CAAZ;MAKAjC,iCAAiC,CAACoB,OAAO,CAACW,IAAT,CAAjC;IACD,CAPI,CAQL;IARK,KASA;MACHlC,YAAY,CAAC,sDAAD,CAAZ;MACAM,OAAO,CAACiC,IAAR;IACD;EACF;AACF,CAlFL,CAmFI;AAnFJ;AAsFAjC,OAAO,CAACkC,KAAR"}
|
package/esm/cli/idp/idp-list.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Command } from 'commander';
|
|
2
2
|
import { Authenticate, Idp, state } from '@rockcarver/frodo-lib';
|
|
3
|
-
import * as common from '../cmd_common
|
|
3
|
+
import * as common from '../cmd_common';
|
|
4
|
+
import { printMessage } from '../../utils/Console';
|
|
4
5
|
const {
|
|
5
6
|
getTokens
|
|
6
7
|
} = Authenticate;
|
|
@@ -21,7 +22,7 @@ async (host, realm, user, password, options) => {
|
|
|
21
22
|
state.default.session.setAllowInsecureConnection(options.insecure);
|
|
22
23
|
|
|
23
24
|
if (await getTokens()) {
|
|
24
|
-
|
|
25
|
+
printMessage(`Listing providers in realm "${state.default.session.getRealm()}"...`);
|
|
25
26
|
listSocialProviders();
|
|
26
27
|
}
|
|
27
28
|
} // end command logic inside action handler
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"idp-list.js","names":["Command","Authenticate","Idp","state","common","getTokens","listSocialProviders","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","
|
|
1
|
+
{"version":3,"file":"idp-list.js","names":["Command","Authenticate","Idp","state","common","printMessage","getTokens","listSocialProviders","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","parse"],"sources":["cli/idp/idp-list.ts"],"sourcesContent":["import { Command } from 'commander';\nimport { Authenticate, Idp, state } from '@rockcarver/frodo-lib';\nimport * as common from '../cmd_common';\nimport { printMessage } from '../../utils/Console';\n\nconst { getTokens } = Authenticate;\nconst { listSocialProviders } = Idp;\n\nconst program = new Command('frodo idp list');\n\nprogram\n .description('List (social) identity providers.')\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('-l, --long', 'Long with all fields.').default(false, 'false')\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 providers in realm \"${state.default.session.getRealm()}\"...`\n );\n listSocialProviders();\n }\n }\n // end command logic inside action handler\n );\n\nprogram.parse();\n"],"mappings":"AAAA,SAASA,OAAT,QAAwB,WAAxB;AACA,SAASC,YAAT,EAAuBC,GAAvB,EAA4BC,KAA5B,QAAyC,uBAAzC;AACA,OAAO,KAAKC,MAAZ,MAAwB,eAAxB;AACA,SAASC,YAAT,QAA6B,qBAA7B;AAEA,MAAM;EAAEC;AAAF,IAAgBL,YAAtB;AACA,MAAM;EAAEM;AAAF,IAA0BL,GAAhC;AAEA,MAAMM,OAAO,GAAG,IAAIR,OAAJ,CAAY,gBAAZ,CAAhB;AAEAQ,OAAO,CACJC,WADH,CACe,mCADf,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,EAUE;AACA;AACA;AAZF,CAaGC,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,+BAA8BF,KAAK,CAACuB,OAAN,CAAcC,OAAd,CAAsBS,QAAtB,EAAiC,MADtD,CAAZ;IAGA7B,mBAAmB;EACpB;AACF,CA5BL,CA6BI;AA7BJ;AAgCAC,OAAO,CAAC6B,KAAR"}
|
package/esm/cli/info/info.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Command } from 'commander';
|
|
2
2
|
import { Authenticate, state } from '@rockcarver/frodo-lib';
|
|
3
|
-
import * as common from '../cmd_common
|
|
3
|
+
import * as common from '../cmd_common';
|
|
4
|
+
import { printMessage } from '../../utils/Console';
|
|
4
5
|
const {
|
|
5
6
|
getTokens
|
|
6
7
|
} = Authenticate;
|
|
@@ -15,14 +16,14 @@ export default function setup() {
|
|
|
15
16
|
state.default.session.setItem('scriptFriendly', options.scriptFriendly);
|
|
16
17
|
|
|
17
18
|
if (!options.scriptFriendly) {
|
|
18
|
-
|
|
19
|
+
printMessage('Printing versions and tokens...');
|
|
19
20
|
|
|
20
21
|
if (await getTokens()) {
|
|
21
|
-
|
|
22
|
-
|
|
22
|
+
printMessage(`Cookie name: ${state.default.session.getCookieName()}`);
|
|
23
|
+
printMessage(`Session token: ${state.default.session.getCookieValue()}`);
|
|
23
24
|
|
|
24
25
|
if (state.default.session.getBearerToken()) {
|
|
25
|
-
|
|
26
|
+
printMessage(`Bearer token: ${state.default.session.getBearerToken()}`);
|
|
26
27
|
}
|
|
27
28
|
} else {
|
|
28
29
|
process.exitCode = 1;
|
|
@@ -37,7 +38,7 @@ export default function setup() {
|
|
|
37
38
|
output['bearerToken'] = state.default.session.getBearerToken();
|
|
38
39
|
}
|
|
39
40
|
|
|
40
|
-
|
|
41
|
+
printMessage(JSON.stringify(output, null, 2), 'data');
|
|
41
42
|
} else {
|
|
42
43
|
process.exitCode = 1;
|
|
43
44
|
}
|
package/esm/cli/info/info.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"info.js","names":["Command","Authenticate","state","common","getTokens","setup","info","addArgument","hostArgumentM","userArgument","passwordArgument","helpOption","addOption","deploymentOption","insecureOption","scriptFriendlyOption","description","action","host","user","password","options","default","session","setTenant","setUsername","setPassword","setDeploymentType","type","setAllowInsecureConnection","insecure","setItem","scriptFriendly","
|
|
1
|
+
{"version":3,"file":"info.js","names":["Command","Authenticate","state","common","printMessage","getTokens","setup","info","addArgument","hostArgumentM","userArgument","passwordArgument","helpOption","addOption","deploymentOption","insecureOption","scriptFriendlyOption","description","action","host","user","password","options","default","session","setTenant","setUsername","setPassword","setDeploymentType","type","setAllowInsecureConnection","insecure","setItem","scriptFriendly","getCookieName","getCookieValue","getBearerToken","process","exitCode","output","cookieName","sessionToken","JSON","stringify","showHelpAfterError"],"sources":["cli/info/info.ts"],"sourcesContent":["import { Command } from 'commander';\nimport { Authenticate, state } from '@rockcarver/frodo-lib';\nimport * as common from '../cmd_common';\nimport { printMessage } from '../../utils/Console';\n\nconst { getTokens } = Authenticate;\n\nexport default function setup() {\n const info = new Command('info');\n info\n .addArgument(common.hostArgumentM)\n .addArgument(common.userArgument)\n .addArgument(common.passwordArgument)\n .helpOption('-h, --help', 'Help')\n .addOption(common.deploymentOption)\n .addOption(common.insecureOption)\n .addOption(common.scriptFriendlyOption)\n .description('Print versions and tokens.')\n .action(async (host, user, password, options) => {\n state.default.session.setTenant(host);\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.setItem('scriptFriendly', options.scriptFriendly);\n if (!options.scriptFriendly) {\n printMessage('Printing versions and tokens...');\n if (await getTokens()) {\n printMessage(`Cookie name: ${state.default.session.getCookieName()}`);\n printMessage(\n `Session token: ${state.default.session.getCookieValue()}`\n );\n if (state.default.session.getBearerToken()) {\n printMessage(\n `Bearer token: ${state.default.session.getBearerToken()}`\n );\n }\n } else {\n process.exitCode = 1;\n }\n } else if (await getTokens()) {\n const output = {\n cookieName: state.default.session.getCookieName(),\n sessionToken: state.default.session.getCookieValue(),\n };\n if (state.default.session.getBearerToken()) {\n output['bearerToken'] = state.default.session.getBearerToken();\n }\n printMessage(JSON.stringify(output, null, 2), 'data');\n } else {\n process.exitCode = 1;\n }\n });\n info.showHelpAfterError();\n return info;\n}\n"],"mappings":"AAAA,SAASA,OAAT,QAAwB,WAAxB;AACA,SAASC,YAAT,EAAuBC,KAAvB,QAAoC,uBAApC;AACA,OAAO,KAAKC,MAAZ,MAAwB,eAAxB;AACA,SAASC,YAAT,QAA6B,qBAA7B;AAEA,MAAM;EAAEC;AAAF,IAAgBJ,YAAtB;AAEA,eAAe,SAASK,KAAT,GAAiB;EAC9B,MAAMC,IAAI,GAAG,IAAIP,OAAJ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AACqB,OAAN,CAAcC,OAAd,CAAsBY,cAAtB,EAAJ,EAA4C;UAC1ChC,YAAY,CACT,iBAAgBF,KAAK,CAACqB,OAAN,CAAcC,OAAd,CAAsBY,cAAtB,EAAuC,EAD9C,CAAZ;QAGD;MACF,CAVD,MAUO;QACLC,OAAO,CAACC,QAAR,GAAmB,CAAnB;MACD;IACF,CAfD,MAeO,IAAI,MAAMjC,SAAS,EAAnB,EAAuB;MAC5B,MAAMkC,MAAM,GAAG;QACbC,UAAU,EAAEtC,KAAK,CAACqB,OAAN,CAAcC,OAAd,CAAsBU,aAAtB,EADC;QAEbO,YAAY,EAAEvC,KAAK,CAACqB,OAAN,CAAcC,OAAd,CAAsBW,cAAtB;MAFD,CAAf;;MAIA,IAAIjC,KAAK,CAACqB,OAAN,CAAcC,OAAd,CAAsBY,cAAtB,EAAJ,EAA4C;QAC1CG,MAAM,CAAC,aAAD,CAAN,GAAwBrC,KAAK,CAACqB,OAAN,CAAcC,OAAd,CAAsBY,cAAtB,EAAxB;MACD;;MACDhC,YAAY,CAACsC,IAAI,CAACC,SAAL,CAAeJ,MAAf,EAAuB,IAAvB,EAA6B,CAA7B,CAAD,EAAkC,MAAlC,CAAZ;IACD,CATM,MASA;MACLF,OAAO,CAACC,QAAR,GAAmB,CAAnB;IACD;EACF,CA3CH;EA4CA/B,IAAI,CAACqC,kBAAL;EACA,OAAOrC,IAAP;AACD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"journey-delete.e2e.test_.js","names":["spawn","spawnSync","ansiEscapeCodes","beforeAll","beforeEach","deleteJourneysCmd","status","console","error","stderr","toString","log","stdout","importTestJourneysCmd","cwd","describe","it","done","deleteJourneyCmd","expected","join","chunks","on","chunk","push","output","Buffer","concat","replace","expect","toContain","str"],"sources":["cli/journey/journey-delete.e2e.test_.ts"],"sourcesContent":["// import { jest } from '@jest/globals';\nimport { spawn, spawnSync } from 'child_process';\n\nconst ansiEscapeCodes =\n // eslint-disable-next-line no-control-regex\n /[\\u001b\\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g;\n\n/**\n * Run once before running the suites in this file\n */\nbeforeAll(async () => {});\n\n/**\n * Run before every test in every suite in this file\n */\nbeforeEach(async () => {\n // delete all journeys\n const deleteJourneysCmd = spawnSync('frodo', [\n 'journey',\n 'delete',\n '--all',\n 'frodo-dev',\n ]);\n if (deleteJourneysCmd.status > 0) {\n console.error(deleteJourneysCmd.stderr.toString());\n console.log(deleteJourneysCmd.stdout.toString());\n }\n\n // import test journeys\n const importTestJourneysCmd = spawnSync(\n 'frodo',\n ['journey', 'import', '--all-separate', 'frodo-dev'],\n {\n cwd: `test/e2e/journey/delete`,\n }\n );\n if (importTestJourneysCmd.status > 0) {\n console.error(importTestJourneysCmd.stderr.toString());\n console.log(importTestJourneysCmd.stdout.toString());\n }\n});\n\ndescribe('frodo journey delete', () => {\n it('\"frodo journey delete -i deleteMe\": should delete the deleteMe journey and all its nodes', (done) => {\n const deleteJourneyCmd = spawn('frodo', [\n 'journey',\n 'delete',\n '-i',\n 'deleteMe',\n 'frodo-dev',\n ]);\n const expected = ['✔ Deleted deleteMe and 7/7 nodes.', ''].join('\\n');\n const chunks = [];\n deleteJourneyCmd.stderr.on('data', (chunk) => {\n chunks.push(chunk);\n });\n deleteJourneyCmd.stderr.on('end', () => {\n const output = Buffer.concat(chunks)\n .toString()\n .replace(ansiEscapeCodes, '');\n try {\n expect(output).toContain(expected);\n done();\n } catch (error) {\n done(error);\n }\n });\n });\n\n it('\"frodo journey delete -i deleteMe --verbose\": should delete the deleteMe journey and all its nodes with verbose output', (done) => {\n const deleteJourneyCmd = spawn('frodo', [\n 'journey',\n 'delete',\n '-i',\n 'deleteMe',\n '--verbose',\n 'frodo-dev',\n ]);\n const expected = [\n 'Deleted deleteMe (tree)\\n',\n 'Read 3c89697f-c114-4d36-907f-6c36f820cde7 (PageNode) from deleteMe\\n',\n 'Deleted 68e23c54-0c9e-4991-9b25-daf306d6ec65 (ZeroPageLoginNode) from deleteMe\\n',\n 'Deleted 9cd184fc-9453-4666-b667-2875d9301b5e (DataStoreDecisionNode) from deleteMe\\n',\n 'Read 2d564be0-325e-439a-aeb0-6c884270c756 (PageNode) from deleteMe\\n',\n 'Deleted 3c89697f-c114-4d36-907f-6c36f820cde7 (PageNode) from deleteMe\\n',\n 'Deleted fab1f53e-cda4-458a-b458-b07f75c75d5f (ValidatedUsernameNode) from deleteMe\\n',\n 'Deleted 2d564be0-325e-439a-aeb0-6c884270c756 (PageNode) from deleteMe\\n',\n 'Deleted 9d146833-e8d1-4802-8c35-0d7772290807 (DisplayUserNameNode) from deleteMe\\n',\n 'Deleted c22373f9-252b-4d0b-b80e-e4b392a17d98 (ValidatedPasswordNode) from deleteMe\\n',\n '✔ Deleted deleteMe and 7/7 nodes.\\n',\n ];\n const chunks = [];\n deleteJourneyCmd.stderr.on('data', (chunk) => {\n chunks.push(chunk);\n });\n deleteJourneyCmd.stderr.on('end', () => {\n const output = Buffer.concat(chunks)\n .toString()\n .replace(ansiEscapeCodes, '');\n try {\n for (const str of expected) {\n expect(output).toContain(str);\n }\n done();\n } catch (error) {\n done(error);\n }\n });\n });\n\n it('\"frodo journey delete -i deleteMe --no-deep\": should delete the deleteMe journey and none of its nodes', (done) => {\n const deleteJourneyCmd = spawn('frodo', [\n 'journey',\n 'delete',\n '-i',\n 'deleteMe',\n '--no-deep',\n 'frodo-dev',\n ]);\n const expected = ['✔ Deleted deleteMe and 0/0 nodes.', ''].join('\\n');\n const chunks = [];\n deleteJourneyCmd.stderr.on('data', (chunk) => {\n chunks.push(chunk);\n });\n deleteJourneyCmd.stderr.on('end', () => {\n const output = Buffer.concat(chunks)\n .toString()\n .replace(ansiEscapeCodes, '');\n try {\n expect(output).toContain(expected);\n done();\n } catch (error) {\n done(error);\n }\n });\n });\n\n it('\"frodo journey delete -i deleteMe --no-deep --verbose\": should delete the deleteMe journey and none of its nodes with verbose output', (done) => {\n const deleteJourneyCmd = spawn('frodo', [\n 'journey',\n 'delete',\n '-i',\n 'deleteMe',\n '--no-deep',\n '--verbose',\n 'frodo-dev',\n ]);\n const expected = [\n 'Deleted deleteMe (tree)\\n',\n '✔ Deleted deleteMe and 0/0 nodes.\\n',\n ];\n const chunks = [];\n deleteJourneyCmd.stderr.on('data', (chunk) => {\n chunks.push(chunk);\n });\n deleteJourneyCmd.stderr.on('end', () => {\n const output = Buffer.concat(chunks)\n .toString()\n .replace(ansiEscapeCodes, '');\n try {\n for (const str of expected) {\n expect(output).toContain(str);\n }\n done();\n } catch (error) {\n done(error);\n }\n });\n });\n});\n\ndescribe('frodo journey delete --all', () => {\n it(\n '\"frodo journey delete -a\": should delete all journeys and all their nodes',\n (done) => {\n const deleteJourneyCmd = spawn('frodo', [\n 'journey',\n 'delete',\n '-a',\n 'frodo-dev',\n ]);\n const expected = [\n '[========================================] 100% | 8/8 | Deleted 8/8 journeys and 51/51 nodes.',\n '',\n ].join('\\n');\n const chunks = [];\n deleteJourneyCmd.stderr.on('data', (chunk) => {\n chunks.push(chunk);\n });\n deleteJourneyCmd.stderr.on('end', () => {\n const output = Buffer.concat(chunks)\n .toString()\n .replace(ansiEscapeCodes, '');\n try {\n expect(output).toContain(expected);\n done();\n } catch (error) {\n done(error);\n }\n });\n },\n // increase timeout for long-running test\n 10 * 1000\n );\n\n it(\n '\"frodo journey delete -a --verbose\": should delete all journeys and all their nodes with verbose output',\n (done) => {\n const deleteJourneyCmd = spawn('frodo', [\n 'journey',\n 'delete',\n '-a',\n '--verbose',\n 'frodo-dev',\n ]);\n const expected = [\n '[----------------------------------------] 0% | 0/8 | Deleting journeys...\\n',\n 'Deleted ResetPassword (tree)\\n',\n 'Read cc3e1ed2-25f1-47bf-83c6-17084f8b2b2b (PageNode) from ResetPassword\\n',\n 'Deleted 06c97be5-7fdd-4739-aea1-ecc7fe082865 (EmailSuspendNode) from ResetPassword\\n',\n 'Deleted 989f0bf8-a328-4217-b82b-5275d79ca8bd (PatchObjectNode) from ResetPassword\\n',\n 'Deleted 21b8ddf3-0203-4ae1-ab05-51cf3a3a707a (IdentifyExistingUserNode) from ResetPassword\\n',\n 'Read e4c752f9-c625-48c9-9644-a58802fa9e9c (PageNode) from ResetPassword\\n',\n 'Deleted cc3e1ed2-25f1-47bf-83c6-17084f8b2b2b (PageNode) from ResetPassword\\n',\n 'Deleted 276afa7c-a680-4cf4-a5f6-d6c78191f5c9 (AttributeCollectorNode) from ResetPassword\\n',\n 'Deleted e4c752f9-c625-48c9-9644-a58802fa9e9c (PageNode) from ResetPassword\\n',\n 'Deleted 009c19c8-9572-47bb-adb2-1f092c559a43 (ValidatedPasswordNode) from ResetPassword\\n',\n 'Deleted Registration (tree)\\n',\n 'Read 0c091c49-f3af-48fb-ac6f-07fba0499dd6 (PageNode) from Registration\\n',\n 'Deleted d3ce2036-1523-4ce8-b1a2-895a2a036667 (AttributeCollectorNode) from Registration\\n',\n 'Deleted 0c091c49-f3af-48fb-ac6f-07fba0499dd6 (PageNode) from Registration\\n',\n 'Deleted 3d8709a1-f09f-4d1f-8094-2850e472c1db (ValidatedPasswordNode) from Registration\\n',\n 'Deleted 120c69d3-90b4-4ad4-b7af-380e8b119340 (KbaCreateNode) from Registration\\n',\n 'Deleted b4a0e915-c15d-4b83-9c9d-18347d645976 (AcceptTermsAndConditionsNode) from Registration\\n',\n 'Deleted ad5dcbb3-7335-49b7-b3e7-7d850bb88237 (CreateObjectNode) from Registration\\n',\n 'Deleted 7fcaf48e-a754-4959-858b-05b2933b825f (ValidatedUsernameNode) from Registration\\n',\n 'Deleted 97a15eb2-a015-4b6d-81a0-be78c3aa1a3b (IncrementLoginCountNode) from Registration\\n',\n 'Deleted PasswordGrant (tree)\\n',\n 'Read 6b9a715d-ea23-4eae-9a59-69797c147157 (PageNode) from PasswordGrant\\n',\n 'Deleted 59952413-9bc2-47e5-a9b2-b04c1d729e24 (UsernameCollectorNode) from PasswordGrant\\n',\n 'Deleted 6b9a715d-ea23-4eae-9a59-69797c147157 (PageNode) from PasswordGrant\\n',\n 'Deleted 8c217417-11dd-4a0f-a9e4-59c2390085be (PasswordCollectorNode) from PasswordGrant\\n',\n 'Deleted e2988546-a459-4c9a-b0e2-fa65ae136b34 (DataStoreDecisionNode) from PasswordGrant\\n',\n 'Deleted ProgressiveProfile (tree)\\n',\n 'Read a5aecad8-854a-4ed5-b719-ff6c90e858c0 (PageNode) from ProgressiveProfile\\n',\n 'Deleted 423a959a-a1b9-498a-b0f7-596b6b6e775a (PatchObjectNode) from ProgressiveProfile\\n',\n 'Deleted a1f45b44-5bf7-4c57-aa3f-75c619c7db8e (QueryFilterDecisionNode) from ProgressiveProfile\\n',\n 'Deleted 8afdaec3-275e-4301-bb53-34f03e6a4b29 (LoginCountDecisionNode) from ProgressiveProfile\\n',\n 'Deleted a5aecad8-854a-4ed5-b719-ff6c90e858c0 (PageNode) from ProgressiveProfile\\n',\n 'Deleted 0a042e10-b22e-4e02-86c4-65e26e775f7a (AttributeCollectorNode) from ProgressiveProfile\\n',\n 'Deleted ForgottenUsername (tree)\\n',\n 'Read 5e2a7c95-94af-4b23-8724-deb13853726a (PageNode) from ForgottenUsername\\n',\n 'Deleted 5e2a7c95-94af-4b23-8724-deb13853726a (PageNode) from ForgottenUsername\\n',\n 'Deleted 9f1e8d94-4922-481b-9e14-212b66548900 (AttributeCollectorNode) from ForgottenUsername\\n',\n 'Deleted bf9ea8d5-9802-4f26-9664-a21840faac23 (IdentifyExistingUserNode) from ForgottenUsername\\n',\n 'Deleted d9a79f01-2ce3-4be2-a28a-975f35c3c8ca (EmailSuspendNode) from ForgottenUsername\\n',\n 'Deleted b93ce36e-1976-4610-b24f-8d6760b5463b (InnerTreeEvaluatorNode) from ForgottenUsername\\n',\n 'Deleted deleteMe (tree)\\n',\n 'Read 3c89697f-c114-4d36-907f-6c36f820cde7 (PageNode) from deleteMe\\n',\n 'Deleted 9cd184fc-9453-4666-b667-2875d9301b5e (DataStoreDecisionNode) from deleteMe\\n',\n 'Read 2d564be0-325e-439a-aeb0-6c884270c756 (PageNode) from deleteMe\\n',\n 'Deleted 68e23c54-0c9e-4991-9b25-daf306d6ec65 (ZeroPageLoginNode) from deleteMe\\n',\n 'Deleted 3c89697f-c114-4d36-907f-6c36f820cde7 (PageNode) from deleteMe\\n',\n 'Deleted fab1f53e-cda4-458a-b458-b07f75c75d5f (ValidatedUsernameNode) from deleteMe\\n',\n 'Deleted c22373f9-252b-4d0b-b80e-e4b392a17d98 (ValidatedPasswordNode) from deleteMe\\n',\n 'Deleted 2d564be0-325e-439a-aeb0-6c884270c756 (PageNode) from deleteMe\\n',\n 'Deleted 9d146833-e8d1-4802-8c35-0d7772290807 (DisplayUserNameNode) from deleteMe\\n',\n 'Deleted UpdatePassword (tree)\\n',\n 'Read 20237b34-26cb-4a0b-958f-abb422290d42 (PageNode) from UpdatePassword\\n',\n 'Read d018fcd1-4e22-4160-8c41-63bee51c9cb3 (PageNode) from UpdatePassword\\n',\n 'Deleted 0f0904e6-1da3-4cdb-9abf-0d2545016fab (AttributePresentDecisionNode) from UpdatePassword\\n',\n 'Deleted 20237b34-26cb-4a0b-958f-abb422290d42 (PageNode) from UpdatePassword\\n',\n 'Deleted 7d1deabe-cd98-49c8-943f-ca12305775f3 (DataStoreDecisionNode) from UpdatePassword\\n',\n 'Deleted fe2962fc-4db3-4066-8624-553649afc438 (ValidatedPasswordNode) from UpdatePassword\\n',\n 'Deleted 3990ce1f-cce6-435b-ae1c-f138e89411c1 (PatchObjectNode) from UpdatePassword\\n',\n 'Deleted a3d97b53-e38a-4b24-aed0-a021050eb744 (EmailSuspendNode) from UpdatePassword\\n',\n 'Deleted d018fcd1-4e22-4160-8c41-63bee51c9cb3 (PageNode) from UpdatePassword\\n',\n 'Deleted 21a99653-a7a7-47ee-b650-f493a84bba09 (ValidatedPasswordNode) from UpdatePassword\\n',\n 'Deleted d1b79744-493a-44fe-bc26-7d324a8caa4e (SessionDataNode) from UpdatePassword\\n',\n 'Deleted Login (tree)\\n',\n 'Read a12bc72f-ad97-4f1e-a789-a1fa3dd566c8 (PageNode) from Login\\n',\n 'Deleted 33b24514-3e50-4180-8f08-ab6f4e51b07e (InnerTreeEvaluatorNode) from Login\\n',\n 'Deleted 2998c1c9-f4c8-4a00-b2c6-3426783ee49d (DataStoreDecisionNode) from Login\\n',\n 'Deleted 7354982f-57b6-4b04-9ddc-f1dd1e1e07d0 (ValidatedUsernameNode) from Login\\n',\n 'Deleted bba3e0d8-8525-4e82-bf48-ac17f7988917 (IncrementLoginCountNode) from Login\\n',\n 'Deleted 0c80c39b-4813-4e67-b4fb-5a0bba85f994 (ValidatedPasswordNode) from Login\\n',\n 'Deleted a12bc72f-ad97-4f1e-a789-a1fa3dd566c8 (PageNode) from Login\\n',\n '[========================================] 100% | 8/8 | Deleted 8/8 journeys and 51/51 nodes.\\n',\n ];\n const chunks = [];\n deleteJourneyCmd.stderr.on('data', (chunk) => {\n chunks.push(chunk);\n });\n deleteJourneyCmd.stderr.on('end', () => {\n const output = Buffer.concat(chunks)\n .toString()\n .replace(ansiEscapeCodes, '');\n try {\n for (const str of expected) {\n expect(output).toContain(str);\n }\n done();\n } catch (error) {\n done(error);\n }\n });\n },\n // increase timeout for long-running test\n 10 * 1000\n );\n\n it('\"frodo journey delete -a --no-deep\": should delete all journeys but none of their nodes', (done) => {\n const deleteJourneyCmd = spawn('frodo', [\n 'journey',\n 'delete',\n '-a',\n '--no-deep',\n 'frodo-dev',\n ]);\n const expected = [\n '[========================================] 100% | 8/8 | Deleted 8/8 journeys and 0/0 nodes.',\n '',\n ].join('\\n');\n const chunks = [];\n deleteJourneyCmd.stderr.on('data', (chunk) => {\n chunks.push(chunk);\n });\n deleteJourneyCmd.stderr.on('end', () => {\n const output = Buffer.concat(chunks)\n .toString()\n .replace(ansiEscapeCodes, '');\n try {\n expect(output).toContain(expected);\n done();\n } catch (error) {\n done(error);\n }\n });\n });\n\n it('\"frodo journey delete -a --no-deep --verbose\": should delete all journeys but none of their nodes with verbose output', (done) => {\n const deleteJourneyCmd = spawn('frodo', [\n 'journey',\n 'delete',\n '-a',\n '--no-deep',\n '--verbose',\n 'frodo-dev',\n ]);\n const expected = [\n '[----------------------------------------] 0% | 0/8 | Deleting journeys...\\n',\n 'Deleted ResetPassword (tree)\\n',\n 'Deleted Registration (tree)\\n',\n 'Deleted PasswordGrant (tree)\\n',\n 'Deleted ProgressiveProfile (tree)\\n',\n 'Deleted ForgottenUsername (tree)\\n',\n 'Deleted deleteMe (tree)\\n',\n 'Deleted UpdatePassword (tree)\\n',\n 'Deleted Login (tree)\\n',\n '[========================================] 100% | 8/8 | Deleted 8/8 journeys and 0/0 nodes.\\n',\n ];\n const chunks = [];\n deleteJourneyCmd.stderr.on('data', (chunk) => {\n chunks.push(chunk);\n });\n deleteJourneyCmd.stderr.on('end', () => {\n const output = Buffer.concat(chunks)\n .toString()\n .replace(ansiEscapeCodes, '');\n try {\n for (const str of expected) {\n expect(output).toContain(str);\n }\n done();\n } catch (error) {\n done(error);\n }\n });\n });\n});\n"],"mappings":"AAAA;AACA,SAASA,KAAT,EAAgBC,SAAhB,QAAiC,eAAjC;AAEA,MAAMC,eAAe,GACnB;AACA,6EAFF;AAIA;AACA;AACA;;AACAC,SAAS,CAAC,YAAY,CAAE,CAAf,CAAT;AAEA;AACA;AACA;;AACAC,UAAU,CAAC,YAAY;EACrB;EACA,MAAMC,iBAAiB,GAAGJ,SAAS,CAAC,OAAD,EAAU,CAC3C,SAD2C,EAE3C,QAF2C,EAG3C,OAH2C,EAI3C,WAJ2C,CAAV,CAAnC;;EAMA,IAAII,iBAAiB,CAACC,MAAlB,GAA2B,CAA/B,EAAkC;IAChCC,OAAO,CAACC,KAAR,CAAcH,iBAAiB,CAACI,MAAlB,CAAyBC,QAAzB,EAAd;IACAH,OAAO,CAACI,GAAR,CAAYN,iBAAiB,CAACO,MAAlB,CAAyBF,QAAzB,EAAZ;EACD,CAXoB,CAarB;;;EACA,MAAMG,qBAAqB,GAAGZ,SA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EAAc;QACdS,IAAI,CAACT,KAAD,CAAJ;MACD;IACF,CAVD;EAWD,CA3BC,CAAF;EA6BAQ,EAAE,CAAC,uHAAD,EAA2HC,IAAD,IAAU;IACpI,MAAMC,gBAAgB,GAAGlB,KAAK,CAAC,OAAD,EAAU,CACtC,SADsC,EAEtC,QAFsC,EAGtC,IAHsC,EAItC,WAJsC,EAKtC,WALsC,EAMtC,WANsC,CAAV,CAA9B;IAQA,MAAMmB,QAAQ,GAAG,CACf,8EADe,EAEf,gCAFe,EAGf,+BAHe,EAIf,gCAJe,EAKf,qCALe,EAMf,oCANe,EAOf,2BAPe,EAQf,iCARe,EASf,wBATe,EAUf,+FAVe,CAAjB;IAYA,MAAME,MAAM,GAAG,EAAf;IACAH,gBAAgB,CAACT,MAAjB,CAAwBa,EAAxB,CAA2B,MAA3B,EAAoCC,KAAD,IAAW;MAC5CF,MAAM,CAACG,IAAP,CAAYD,KAAZ;IACD,CAFD;IAGAL,gBAAgB,CAACT,MAAjB,CAAwBa,EAAxB,CAA2B,KAA3B,EAAkC,MAAM;MACtC,MAAMG,MAAM,GAAGC,MAAM,CAACC,MAAP,CAAcN,MAAd,EACZX,QADY,GAEZkB,OAFY,CAEJ1B,eAFI,EAEa,EAFb,CAAf;;MAGA,IAAI;QACF,KAAK,MAAM6B,GAAX,IAAkBZ,QAAlB,EAA4B;UAC1BU,MAAM,CAACJ,MAAD,CAAN,CAAeK,SAAf,CAAyBC,GAAzB;QACD;;QACDd,IAAI;MACL,CALD,CAKE,OAAOT,KAAP,EAAc;QACdS,IAAI,CAACT,KAAD,CAAJ;MACD;IACF,CAZD;EAaD,CAtCC,CAAF;AAuCD,CAhNO,CAAR"}
|
|
1
|
+
{"version":3,"file":"journey-delete.e2e.test_.js","names":["spawn","spawnSync","ansiEscapeCodes","beforeAll","beforeEach","deleteJourneysCmd","status","console","error","stderr","toString","log","stdout","importTestJourneysCmd","cwd","describe","it","done","deleteJourneyCmd","expected","join","chunks","on","chunk","push","output","Buffer","concat","replace","expect","toContain","str"],"sources":["cli/journey/journey-delete.e2e.test_.ts"],"sourcesContent":["/* eslint-disable no-console */\n// import { jest } from '@jest/globals';\nimport { spawn, spawnSync } from 'child_process';\n\nconst ansiEscapeCodes =\n // eslint-disable-next-line no-control-regex\n /[\\u001b\\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g;\n\n/**\n * Run once before running the suites in this file\n */\nbeforeAll(async () => {\n //\n});\n\n/**\n * Run before every test in every suite in this file\n */\nbeforeEach(async () => {\n // delete all journeys\n const deleteJourneysCmd = spawnSync('frodo', [\n 'journey',\n 'delete',\n '--all',\n 'frodo-dev',\n ]);\n if (deleteJourneysCmd.status && deleteJourneysCmd.status > 0) {\n console.error(deleteJourneysCmd.stderr.toString());\n console.log(deleteJourneysCmd.stdout.toString());\n }\n\n // import test journeys\n const importTestJourneysCmd = spawnSync(\n 'frodo',\n ['journey', 'import', '--all-separate', 'frodo-dev'],\n {\n cwd: `test/e2e/journey/delete`,\n }\n );\n if (importTestJourneysCmd.status && importTestJourneysCmd.status > 0) {\n console.error(importTestJourneysCmd.stderr.toString());\n console.log(importTestJourneysCmd.stdout.toString());\n }\n});\n\ndescribe('frodo journey delete', () => {\n it('\"frodo journey delete -i deleteMe\": should delete the deleteMe journey and all its nodes', (done) => {\n const deleteJourneyCmd = spawn('frodo', [\n 'journey',\n 'delete',\n '-i',\n 'deleteMe',\n 'frodo-dev',\n ]);\n const expected = ['✔ Deleted deleteMe and 7/7 nodes.', ''].join('\\n');\n const chunks: Uint8Array[] = [];\n deleteJourneyCmd.stderr.on('data', (chunk) => {\n chunks.push(chunk);\n });\n deleteJourneyCmd.stderr.on('end', () => {\n const output = Buffer.concat(chunks)\n .toString()\n .replace(ansiEscapeCodes, '');\n try {\n expect(output).toContain(expected);\n done();\n } catch (error) {\n done(error);\n }\n });\n });\n\n it('\"frodo journey delete -i deleteMe --verbose\": should delete the deleteMe journey and all its nodes with verbose output', (done) => {\n const deleteJourneyCmd = spawn('frodo', [\n 'journey',\n 'delete',\n '-i',\n 'deleteMe',\n '--verbose',\n 'frodo-dev',\n ]);\n const expected = [\n 'Deleted deleteMe (tree)\\n',\n 'Read 3c89697f-c114-4d36-907f-6c36f820cde7 (PageNode) from deleteMe\\n',\n 'Deleted 68e23c54-0c9e-4991-9b25-daf306d6ec65 (ZeroPageLoginNode) from deleteMe\\n',\n 'Deleted 9cd184fc-9453-4666-b667-2875d9301b5e (DataStoreDecisionNode) from deleteMe\\n',\n 'Read 2d564be0-325e-439a-aeb0-6c884270c756 (PageNode) from deleteMe\\n',\n 'Deleted 3c89697f-c114-4d36-907f-6c36f820cde7 (PageNode) from deleteMe\\n',\n 'Deleted fab1f53e-cda4-458a-b458-b07f75c75d5f (ValidatedUsernameNode) from deleteMe\\n',\n 'Deleted 2d564be0-325e-439a-aeb0-6c884270c756 (PageNode) from deleteMe\\n',\n 'Deleted 9d146833-e8d1-4802-8c35-0d7772290807 (DisplayUserNameNode) from deleteMe\\n',\n 'Deleted c22373f9-252b-4d0b-b80e-e4b392a17d98 (ValidatedPasswordNode) from deleteMe\\n',\n '✔ Deleted deleteMe and 7/7 nodes.\\n',\n ];\n const chunks: Uint8Array[] = [];\n deleteJourneyCmd.stderr.on('data', (chunk) => {\n chunks.push(chunk);\n });\n deleteJourneyCmd.stderr.on('end', () => {\n const output = Buffer.concat(chunks)\n .toString()\n .replace(ansiEscapeCodes, '');\n try {\n for (const str of expected) {\n expect(output).toContain(str);\n }\n done();\n } catch (error) {\n done(error);\n }\n });\n });\n\n it('\"frodo journey delete -i deleteMe --no-deep\": should delete the deleteMe journey and none of its nodes', (done) => {\n const deleteJourneyCmd = spawn('frodo', [\n 'journey',\n 'delete',\n '-i',\n 'deleteMe',\n '--no-deep',\n 'frodo-dev',\n ]);\n const expected = ['✔ Deleted deleteMe and 0/0 nodes.', ''].join('\\n');\n const chunks: Uint8Array[] = [];\n deleteJourneyCmd.stderr.on('data', (chunk) => {\n chunks.push(chunk);\n });\n deleteJourneyCmd.stderr.on('end', () => {\n const output = Buffer.concat(chunks)\n .toString()\n .replace(ansiEscapeCodes, '');\n try {\n expect(output).toContain(expected);\n done();\n } catch (error) {\n done(error);\n }\n });\n });\n\n it('\"frodo journey delete -i deleteMe --no-deep --verbose\": should delete the deleteMe journey and none of its nodes with verbose output', (done) => {\n const deleteJourneyCmd = spawn('frodo', [\n 'journey',\n 'delete',\n '-i',\n 'deleteMe',\n '--no-deep',\n '--verbose',\n 'frodo-dev',\n ]);\n const expected = [\n 'Deleted deleteMe (tree)\\n',\n '✔ Deleted deleteMe and 0/0 nodes.\\n',\n ];\n const chunks: Uint8Array[] = [];\n deleteJourneyCmd.stderr.on('data', (chunk) => {\n chunks.push(chunk);\n });\n deleteJourneyCmd.stderr.on('end', () => {\n const output = Buffer.concat(chunks)\n .toString()\n .replace(ansiEscapeCodes, '');\n try {\n for (const str of expected) {\n expect(output).toContain(str);\n }\n done();\n } catch (error) {\n done(error);\n }\n });\n });\n});\n\ndescribe('frodo journey delete --all', () => {\n it(\n '\"frodo journey delete -a\": should delete all journeys and all their nodes',\n (done) => {\n const deleteJourneyCmd = spawn('frodo', [\n 'journey',\n 'delete',\n '-a',\n 'frodo-dev',\n ]);\n const expected = [\n '[========================================] 100% | 8/8 | Deleted 8/8 journeys and 51/51 nodes.',\n '',\n ].join('\\n');\n const chunks: Uint8Array[] = [];\n deleteJourneyCmd.stderr.on('data', (chunk) => {\n chunks.push(chunk);\n });\n deleteJourneyCmd.stderr.on('end', () => {\n const output = Buffer.concat(chunks)\n .toString()\n .replace(ansiEscapeCodes, '');\n try {\n expect(output).toContain(expected);\n done();\n } catch (error) {\n done(error);\n }\n });\n },\n // increase timeout for long-running test\n 10 * 1000\n );\n\n it(\n '\"frodo journey delete -a --verbose\": should delete all journeys and all their nodes with verbose output',\n (done) => {\n const deleteJourneyCmd = spawn('frodo', [\n 'journey',\n 'delete',\n '-a',\n '--verbose',\n 'frodo-dev',\n ]);\n const expected = [\n '[----------------------------------------] 0% | 0/8 | Deleting journeys...\\n',\n 'Deleted ResetPassword (tree)\\n',\n 'Read cc3e1ed2-25f1-47bf-83c6-17084f8b2b2b (PageNode) from ResetPassword\\n',\n 'Deleted 06c97be5-7fdd-4739-aea1-ecc7fe082865 (EmailSuspendNode) from ResetPassword\\n',\n 'Deleted 989f0bf8-a328-4217-b82b-5275d79ca8bd (PatchObjectNode) from ResetPassword\\n',\n 'Deleted 21b8ddf3-0203-4ae1-ab05-51cf3a3a707a (IdentifyExistingUserNode) from ResetPassword\\n',\n 'Read e4c752f9-c625-48c9-9644-a58802fa9e9c (PageNode) from ResetPassword\\n',\n 'Deleted cc3e1ed2-25f1-47bf-83c6-17084f8b2b2b (PageNode) from ResetPassword\\n',\n 'Deleted 276afa7c-a680-4cf4-a5f6-d6c78191f5c9 (AttributeCollectorNode) from ResetPassword\\n',\n 'Deleted e4c752f9-c625-48c9-9644-a58802fa9e9c (PageNode) from ResetPassword\\n',\n 'Deleted 009c19c8-9572-47bb-adb2-1f092c559a43 (ValidatedPasswordNode) from ResetPassword\\n',\n 'Deleted Registration (tree)\\n',\n 'Read 0c091c49-f3af-48fb-ac6f-07fba0499dd6 (PageNode) from Registration\\n',\n 'Deleted d3ce2036-1523-4ce8-b1a2-895a2a036667 (AttributeCollectorNode) from Registration\\n',\n 'Deleted 0c091c49-f3af-48fb-ac6f-07fba0499dd6 (PageNode) from Registration\\n',\n 'Deleted 3d8709a1-f09f-4d1f-8094-2850e472c1db (ValidatedPasswordNode) from Registration\\n',\n 'Deleted 120c69d3-90b4-4ad4-b7af-380e8b119340 (KbaCreateNode) from Registration\\n',\n 'Deleted b4a0e915-c15d-4b83-9c9d-18347d645976 (AcceptTermsAndConditionsNode) from Registration\\n',\n 'Deleted ad5dcbb3-7335-49b7-b3e7-7d850bb88237 (CreateObjectNode) from Registration\\n',\n 'Deleted 7fcaf48e-a754-4959-858b-05b2933b825f (ValidatedUsernameNode) from Registration\\n',\n 'Deleted 97a15eb2-a015-4b6d-81a0-be78c3aa1a3b (IncrementLoginCountNode) from Registration\\n',\n 'Deleted PasswordGrant (tree)\\n',\n 'Read 6b9a715d-ea23-4eae-9a59-69797c147157 (PageNode) from PasswordGrant\\n',\n 'Deleted 59952413-9bc2-47e5-a9b2-b04c1d729e24 (UsernameCollectorNode) from PasswordGrant\\n',\n 'Deleted 6b9a715d-ea23-4eae-9a59-69797c147157 (PageNode) from PasswordGrant\\n',\n 'Deleted 8c217417-11dd-4a0f-a9e4-59c2390085be (PasswordCollectorNode) from PasswordGrant\\n',\n 'Deleted e2988546-a459-4c9a-b0e2-fa65ae136b34 (DataStoreDecisionNode) from PasswordGrant\\n',\n 'Deleted ProgressiveProfile (tree)\\n',\n 'Read a5aecad8-854a-4ed5-b719-ff6c90e858c0 (PageNode) from ProgressiveProfile\\n',\n 'Deleted 423a959a-a1b9-498a-b0f7-596b6b6e775a (PatchObjectNode) from ProgressiveProfile\\n',\n 'Deleted a1f45b44-5bf7-4c57-aa3f-75c619c7db8e (QueryFilterDecisionNode) from ProgressiveProfile\\n',\n 'Deleted 8afdaec3-275e-4301-bb53-34f03e6a4b29 (LoginCountDecisionNode) from ProgressiveProfile\\n',\n 'Deleted a5aecad8-854a-4ed5-b719-ff6c90e858c0 (PageNode) from ProgressiveProfile\\n',\n 'Deleted 0a042e10-b22e-4e02-86c4-65e26e775f7a (AttributeCollectorNode) from ProgressiveProfile\\n',\n 'Deleted ForgottenUsername (tree)\\n',\n 'Read 5e2a7c95-94af-4b23-8724-deb13853726a (PageNode) from ForgottenUsername\\n',\n 'Deleted 5e2a7c95-94af-4b23-8724-deb13853726a (PageNode) from ForgottenUsername\\n',\n 'Deleted 9f1e8d94-4922-481b-9e14-212b66548900 (AttributeCollectorNode) from ForgottenUsername\\n',\n 'Deleted bf9ea8d5-9802-4f26-9664-a21840faac23 (IdentifyExistingUserNode) from ForgottenUsername\\n',\n 'Deleted d9a79f01-2ce3-4be2-a28a-975f35c3c8ca (EmailSuspendNode) from ForgottenUsername\\n',\n 'Deleted b93ce36e-1976-4610-b24f-8d6760b5463b (InnerTreeEvaluatorNode) from ForgottenUsername\\n',\n 'Deleted deleteMe (tree)\\n',\n 'Read 3c89697f-c114-4d36-907f-6c36f820cde7 (PageNode) from deleteMe\\n',\n 'Deleted 9cd184fc-9453-4666-b667-2875d9301b5e (DataStoreDecisionNode) from deleteMe\\n',\n 'Read 2d564be0-325e-439a-aeb0-6c884270c756 (PageNode) from deleteMe\\n',\n 'Deleted 68e23c54-0c9e-4991-9b25-daf306d6ec65 (ZeroPageLoginNode) from deleteMe\\n',\n 'Deleted 3c89697f-c114-4d36-907f-6c36f820cde7 (PageNode) from deleteMe\\n',\n 'Deleted fab1f53e-cda4-458a-b458-b07f75c75d5f (ValidatedUsernameNode) from deleteMe\\n',\n 'Deleted c22373f9-252b-4d0b-b80e-e4b392a17d98 (ValidatedPasswordNode) from deleteMe\\n',\n 'Deleted 2d564be0-325e-439a-aeb0-6c884270c756 (PageNode) from deleteMe\\n',\n 'Deleted 9d146833-e8d1-4802-8c35-0d7772290807 (DisplayUserNameNode) from deleteMe\\n',\n 'Deleted UpdatePassword (tree)\\n',\n 'Read 20237b34-26cb-4a0b-958f-abb422290d42 (PageNode) from UpdatePassword\\n',\n 'Read d018fcd1-4e22-4160-8c41-63bee51c9cb3 (PageNode) from UpdatePassword\\n',\n 'Deleted 0f0904e6-1da3-4cdb-9abf-0d2545016fab (AttributePresentDecisionNode) from UpdatePassword\\n',\n 'Deleted 20237b34-26cb-4a0b-958f-abb422290d42 (PageNode) from UpdatePassword\\n',\n 'Deleted 7d1deabe-cd98-49c8-943f-ca12305775f3 (DataStoreDecisionNode) from UpdatePassword\\n',\n 'Deleted fe2962fc-4db3-4066-8624-553649afc438 (ValidatedPasswordNode) from UpdatePassword\\n',\n 'Deleted 3990ce1f-cce6-435b-ae1c-f138e89411c1 (PatchObjectNode) from UpdatePassword\\n',\n 'Deleted a3d97b53-e38a-4b24-aed0-a021050eb744 (EmailSuspendNode) from UpdatePassword\\n',\n 'Deleted d018fcd1-4e22-4160-8c41-63bee51c9cb3 (PageNode) from UpdatePassword\\n',\n 'Deleted 21a99653-a7a7-47ee-b650-f493a84bba09 (ValidatedPasswordNode) from UpdatePassword\\n',\n 'Deleted d1b79744-493a-44fe-bc26-7d324a8caa4e (SessionDataNode) from UpdatePassword\\n',\n 'Deleted Login (tree)\\n',\n 'Read a12bc72f-ad97-4f1e-a789-a1fa3dd566c8 (PageNode) from Login\\n',\n 'Deleted 33b24514-3e50-4180-8f08-ab6f4e51b07e (InnerTreeEvaluatorNode) from Login\\n',\n 'Deleted 2998c1c9-f4c8-4a00-b2c6-3426783ee49d (DataStoreDecisionNode) from Login\\n',\n 'Deleted 7354982f-57b6-4b04-9ddc-f1dd1e1e07d0 (ValidatedUsernameNode) from Login\\n',\n 'Deleted bba3e0d8-8525-4e82-bf48-ac17f7988917 (IncrementLoginCountNode) from Login\\n',\n 'Deleted 0c80c39b-4813-4e67-b4fb-5a0bba85f994 (ValidatedPasswordNode) from Login\\n',\n 'Deleted a12bc72f-ad97-4f1e-a789-a1fa3dd566c8 (PageNode) from Login\\n',\n '[========================================] 100% | 8/8 | Deleted 8/8 journeys and 51/51 nodes.\\n',\n ];\n const chunks: Uint8Array[] = [];\n deleteJourneyCmd.stderr.on('data', (chunk) => {\n chunks.push(chunk);\n });\n deleteJourneyCmd.stderr.on('end', () => {\n const output = Buffer.concat(chunks)\n .toString()\n .replace(ansiEscapeCodes, '');\n try {\n for (const str of expected) {\n expect(output).toContain(str);\n }\n done();\n } catch (error) {\n done(error);\n }\n });\n },\n // increase timeout for long-running test\n 10 * 1000\n );\n\n it('\"frodo journey delete -a --no-deep\": should delete all journeys but none of their nodes', (done) => {\n const deleteJourneyCmd = spawn('frodo', [\n 'journey',\n 'delete',\n '-a',\n '--no-deep',\n 'frodo-dev',\n ]);\n const expected = [\n '[========================================] 100% | 8/8 | Deleted 8/8 journeys and 0/0 nodes.',\n '',\n ].join('\\n');\n const chunks: Uint8Array[] = [];\n deleteJourneyCmd.stderr.on('data', (chunk) => {\n chunks.push(chunk);\n });\n deleteJourneyCmd.stderr.on('end', () => {\n const output = Buffer.concat(chunks)\n .toString()\n .replace(ansiEscapeCodes, '');\n try {\n expect(output).toContain(expected);\n done();\n } catch (error) {\n done(error);\n }\n });\n });\n\n it('\"frodo journey delete -a --no-deep --verbose\": should delete all journeys but none of their nodes with verbose output', (done) => {\n const deleteJourneyCmd = spawn('frodo', [\n 'journey',\n 'delete',\n '-a',\n '--no-deep',\n '--verbose',\n 'frodo-dev',\n ]);\n const expected = [\n '[----------------------------------------] 0% | 0/8 | Deleting journeys...\\n',\n 'Deleted ResetPassword (tree)\\n',\n 'Deleted Registration (tree)\\n',\n 'Deleted PasswordGrant (tree)\\n',\n 'Deleted ProgressiveProfile (tree)\\n',\n 'Deleted ForgottenUsername (tree)\\n',\n 'Deleted deleteMe (tree)\\n',\n 'Deleted UpdatePassword (tree)\\n',\n 'Deleted Login (tree)\\n',\n '[========================================] 100% | 8/8 | Deleted 8/8 journeys and 0/0 nodes.\\n',\n ];\n const chunks: Uint8Array[] = [];\n deleteJourneyCmd.stderr.on('data', (chunk) => {\n chunks.push(chunk);\n });\n deleteJourneyCmd.stderr.on('end', () => {\n const output = Buffer.concat(chunks)\n .toString()\n .replace(ansiEscapeCodes, '');\n try {\n for (const str of expected) {\n expect(output).toContain(str);\n }\n done();\n } catch (error) {\n done(error);\n }\n });\n });\n});\n"],"mappings":"AAAA;AACA;AACA,SAASA,KAAT,EAAgBC,SAAhB,QAAiC,eAAjC;AAEA,MAAMC,eAAe,GACnB;AACA,6EAFF;AAIA;AACA;AACA;;AACAC,SAAS,CAAC,YAAY,CACpB;AACD,CAFQ,CAAT;AAIA;AACA;AACA;;AACAC,UAAU,CAAC,YAAY;EACrB;EACA,MAAMC,iBAAiB,GAAGJ,SAAS,CAAC,OAAD,EAAU,CAC3C,SAD2C,EAE3C,QAF2C,EA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AM,CAACJ,MAAD,CAAN,CAAeK,SAAf,CAAyBC,GAAzB;QACD;;QACDd,IAAI;MACL,CALD,CAKE,OAAOT,KAAP,EAAc;QACdS,IAAI,CAACT,KAAD,CAAJ;MACD;IACF,CAZD;EAaD,CAtCC,CAAF;AAuCD,CAhNO,CAAR"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Command, Option } from 'commander';
|
|
2
2
|
import { Authenticate, Journey, state } from '@rockcarver/frodo-lib';
|
|
3
|
-
import * as common from '../cmd_common
|
|
3
|
+
import * as common from '../cmd_common';
|
|
4
|
+
import { printMessage } from '../../utils/Console';
|
|
4
5
|
const {
|
|
5
6
|
getTokens
|
|
6
7
|
} = Authenticate;
|
|
@@ -21,15 +22,15 @@ async (host, realm, user, password, options) => {
|
|
|
21
22
|
if (await getTokens()) {
|
|
22
23
|
// delete by id
|
|
23
24
|
if (options.journeyId) {
|
|
24
|
-
|
|
25
|
+
printMessage(`Deleting journey ${options.journeyId} in realm "${state.default.session.getRealm()}"...`);
|
|
25
26
|
deleteJourney(options.journeyId, options);
|
|
26
27
|
} // --all -a
|
|
27
28
|
else if (options.all) {
|
|
28
|
-
|
|
29
|
+
printMessage('Deleting all journeys...');
|
|
29
30
|
deleteJourneys(options);
|
|
30
31
|
} // unrecognized combination of options or no options
|
|
31
32
|
else {
|
|
32
|
-
|
|
33
|
+
printMessage('Unrecognized combination of options or no options...');
|
|
33
34
|
program.help();
|
|
34
35
|
}
|
|
35
36
|
}
|