@rockcarver/frodo-cli 0.15.0 → 0.15.1
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 +17 -1
- package/esm/app.js +55 -0
- package/esm/app.js.map +1 -0
- package/esm/cli/_template/cmd-delete.js +22 -0
- package/esm/cli/_template/cmd-delete.js.map +1 -0
- package/esm/cli/_template/cmd-describe.js +22 -0
- package/esm/cli/_template/cmd-describe.js.map +1 -0
- package/esm/cli/_template/cmd-export.js +22 -0
- package/esm/cli/_template/cmd-export.js.map +1 -0
- package/esm/cli/_template/cmd-import.js +22 -0
- package/esm/cli/_template/cmd-import.js.map +1 -0
- package/esm/cli/_template/cmd-list.js +22 -0
- package/esm/cli/_template/cmd-list.js.map +1 -0
- package/esm/cli/_template/cmd-sub1-delete.js +22 -0
- package/esm/cli/_template/cmd-sub1-delete.js.map +1 -0
- package/esm/cli/_template/cmd-sub1-describe.js +22 -0
- package/esm/cli/_template/cmd-sub1-describe.js.map +1 -0
- package/esm/cli/_template/cmd-sub1-export.js +22 -0
- package/esm/cli/_template/cmd-sub1-export.js.map +1 -0
- package/esm/cli/_template/cmd-sub1-import.js +22 -0
- package/esm/cli/_template/cmd-sub1-import.js.map +1 -0
- package/esm/cli/_template/cmd-sub1-list.js +22 -0
- package/esm/cli/_template/cmd-sub1-list.js.map +1 -0
- package/esm/cli/_template/cmd-sub1.js +10 -0
- package/esm/cli/_template/cmd-sub1.js.map +1 -0
- package/esm/cli/_template/cmd-sub2-delete.js +22 -0
- package/esm/cli/_template/cmd-sub2-delete.js.map +1 -0
- package/esm/cli/_template/cmd-sub2-describe.js +22 -0
- package/esm/cli/_template/cmd-sub2-describe.js.map +1 -0
- package/esm/cli/_template/cmd-sub2-export.js +22 -0
- package/esm/cli/_template/cmd-sub2-export.js.map +1 -0
- package/esm/cli/_template/cmd-sub2-import.js +22 -0
- package/esm/cli/_template/cmd-sub2-import.js.map +1 -0
- package/esm/cli/_template/cmd-sub2-list.js +22 -0
- package/esm/cli/_template/cmd-sub2-list.js.map +1 -0
- package/esm/cli/_template/cmd-sub2.js +10 -0
- package/esm/cli/_template/cmd-sub2.js.map +1 -0
- package/esm/cli/_template/cmd.js +19 -0
- package/esm/cli/_template/cmd.js.map +1 -0
- package/esm/cli/admin/admin-add-autoid-static-user-mapping.js +28 -0
- package/esm/cli/admin/admin-add-autoid-static-user-mapping.js.map +1 -0
- package/esm/cli/admin/admin-create-oauth2-client-with-admin-privileges.js +85 -0
- package/esm/cli/admin/admin-create-oauth2-client-with-admin-privileges.js.map +1 -0
- package/esm/cli/admin/admin-get-access-token.js +28 -0
- package/esm/cli/admin/admin-get-access-token.js.map +1 -0
- package/esm/cli/admin/admin-grant-oauth2-client-admin-privileges.js +28 -0
- package/esm/cli/admin/admin-grant-oauth2-client-admin-privileges.js.map +1 -0
- package/esm/cli/admin/admin-hide-generic-extension-attributes.js +28 -0
- package/esm/cli/admin/admin-hide-generic-extension-attributes.js.map +1 -0
- package/esm/cli/admin/admin-list-oauth2-clients-with-admin-privileges.js +31 -0
- package/esm/cli/admin/admin-list-oauth2-clients-with-admin-privileges.js.map +1 -0
- package/esm/cli/admin/admin-list-oauth2-clients-with-custom-privileges.js +31 -0
- package/esm/cli/admin/admin-list-oauth2-clients-with-custom-privileges.js.map +1 -0
- package/esm/cli/admin/admin-list-static-user-mappings.js +31 -0
- package/esm/cli/admin/admin-list-static-user-mappings.js.map +1 -0
- package/esm/cli/admin/admin-remove-static-user-mapping.js +28 -0
- package/esm/cli/admin/admin-remove-static-user-mapping.js.map +1 -0
- package/esm/cli/admin/admin-repair-org-model.js +28 -0
- package/esm/cli/admin/admin-repair-org-model.js.map +1 -0
- package/esm/cli/admin/admin-revoke-oauth2-client-admin-privileges.js +28 -0
- package/esm/cli/admin/admin-revoke-oauth2-client-admin-privileges.js.map +1 -0
- package/esm/cli/admin/admin-show-generic-extension-attributes.js +28 -0
- package/esm/cli/admin/admin-show-generic-extension-attributes.js.map +1 -0
- package/esm/cli/admin/admin.js +24 -0
- package/esm/cli/admin/admin.js.map +1 -0
- package/esm/cli/app/app-delete.js +22 -0
- package/esm/cli/app/app-delete.js.map +1 -0
- package/esm/cli/app/app-describe.js +22 -0
- package/esm/cli/app/app-describe.js.map +1 -0
- package/esm/cli/app/app-export.js +44 -0
- package/esm/cli/app/app-export.js.map +1 -0
- package/esm/cli/app/app-import.js +45 -0
- package/esm/cli/app/app-import.js.map +1 -0
- package/esm/cli/app/app-list.js +27 -0
- package/esm/cli/app/app-list.js.map +1 -0
- package/esm/cli/app/app.js +20 -0
- package/esm/cli/app/app.js.map +1 -0
- package/esm/cli/cmd_common.js +77 -0
- package/esm/cli/cmd_common.js.map +1 -0
- package/esm/cli/conn/conn-add.js +37 -0
- package/esm/cli/conn/conn-add.js.map +1 -0
- package/esm/cli/conn/conn-delete.js +14 -0
- package/esm/cli/conn/conn-delete.js.map +1 -0
- package/esm/cli/conn/conn-describe.js +14 -0
- package/esm/cli/conn/conn-describe.js.map +1 -0
- package/esm/cli/conn/conn-list.js +16 -0
- package/esm/cli/conn/conn-list.js.map +1 -0
- package/esm/cli/conn/conn.js +17 -0
- package/esm/cli/conn/conn.js.map +1 -0
- package/esm/cli/email/email-template-export.js +44 -0
- package/esm/cli/email/email-template-export.js.map +1 -0
- package/esm/cli/email/email-template-import.js +49 -0
- package/esm/cli/email/email-template-import.js.map +1 -0
- package/esm/cli/email/email-template-list.js +27 -0
- package/esm/cli/email/email-template-list.js.map +1 -0
- package/esm/cli/email/email-template.js +8 -0
- package/esm/cli/email/email-template.js.map +1 -0
- package/esm/cli/email/email.js +13 -0
- package/esm/cli/email/email.js.map +1 -0
- package/esm/cli/esv/esv-apply.js +67 -0
- package/esm/cli/esv/esv-apply.js.map +1 -0
- package/esm/cli/esv/esv-secret-create.js +27 -0
- package/esm/cli/esv/esv-secret-create.js.map +1 -0
- package/esm/cli/esv/esv-secret-delete.js +39 -0
- package/esm/cli/esv/esv-secret-delete.js.map +1 -0
- package/esm/cli/esv/esv-secret-describe.js +27 -0
- package/esm/cli/esv/esv-secret-describe.js.map +1 -0
- package/esm/cli/esv/esv-secret-export.js +22 -0
- package/esm/cli/esv/esv-secret-export.js.map +1 -0
- package/esm/cli/esv/esv-secret-import.js +22 -0
- package/esm/cli/esv/esv-secret-import.js.map +1 -0
- package/esm/cli/esv/esv-secret-list.js +27 -0
- package/esm/cli/esv/esv-secret-list.js.map +1 -0
- package/esm/cli/esv/esv-secret-set.js +27 -0
- package/esm/cli/esv/esv-secret-set.js.map +1 -0
- package/esm/cli/esv/esv-secret-version-activate.js +34 -0
- package/esm/cli/esv/esv-secret-version-activate.js.map +1 -0
- package/esm/cli/esv/esv-secret-version-create.js +27 -0
- package/esm/cli/esv/esv-secret-version-create.js.map +1 -0
- package/esm/cli/esv/esv-secret-version-deactivate.js +34 -0
- package/esm/cli/esv/esv-secret-version-deactivate.js.map +1 -0
- package/esm/cli/esv/esv-secret-version-delete.js +39 -0
- package/esm/cli/esv/esv-secret-version-delete.js.map +1 -0
- package/esm/cli/esv/esv-secret-version-list.js +27 -0
- package/esm/cli/esv/esv-secret-version-list.js.map +1 -0
- package/esm/cli/esv/esv-secret-version.js +10 -0
- package/esm/cli/esv/esv-secret-version.js.map +1 -0
- package/esm/cli/esv/esv-secret.js +13 -0
- package/esm/cli/esv/esv-secret.js.map +1 -0
- package/esm/cli/esv/esv-variable-create.js +27 -0
- package/esm/cli/esv/esv-variable-create.js.map +1 -0
- package/esm/cli/esv/esv-variable-delete.js +39 -0
- package/esm/cli/esv/esv-variable-delete.js.map +1 -0
- package/esm/cli/esv/esv-variable-describe.js +27 -0
- package/esm/cli/esv/esv-variable-describe.js.map +1 -0
- package/esm/cli/esv/esv-variable-export.js +22 -0
- package/esm/cli/esv/esv-variable-export.js.map +1 -0
- package/esm/cli/esv/esv-variable-import.js +22 -0
- package/esm/cli/esv/esv-variable-import.js.map +1 -0
- package/esm/cli/esv/esv-variable-list.js +27 -0
- package/esm/cli/esv/esv-variable-list.js.map +1 -0
- package/esm/cli/esv/esv-variable-set.js +37 -0
- package/esm/cli/esv/esv-variable-set.js.map +1 -0
- package/esm/cli/esv/esv-variable.js +12 -0
- package/esm/cli/esv/esv-variable.js.map +1 -0
- package/esm/cli/esv/esv.js +15 -0
- package/esm/cli/esv/esv.js.map +1 -0
- package/esm/cli/idm/idm-count.js +27 -0
- package/esm/cli/idm/idm-count.js.map +1 -0
- package/esm/cli/idm/idm-export.js +44 -0
- package/esm/cli/idm/idm-export.js.map +1 -0
- package/esm/cli/idm/idm-list.js +30 -0
- package/esm/cli/idm/idm-list.js.map +1 -0
- package/esm/cli/idm/idm.js +16 -0
- package/esm/cli/idm/idm.js.map +1 -0
- package/esm/cli/idp/idp-export.js +44 -0
- package/esm/cli/idp/idp-export.js.map +1 -0
- package/esm/cli/idp/idp-import.js +49 -0
- package/esm/cli/idp/idp-import.js.map +1 -0
- package/esm/cli/idp/idp-list.js +30 -0
- package/esm/cli/idp/idp-list.js.map +1 -0
- package/esm/cli/idp/idp.js +15 -0
- package/esm/cli/idp/idp.js.map +1 -0
- package/esm/cli/info/info.js +48 -0
- package/esm/cli/info/info.js.map +1 -0
- package/esm/cli/journey/journey-delete.e2e.test_.js.map +1 -0
- package/esm/cli/journey/journey-delete.js +39 -0
- package/esm/cli/journey/journey-delete.js.map +1 -0
- package/esm/cli/journey/journey-describe.js +100 -0
- package/esm/cli/journey/journey-describe.js.map +1 -0
- package/esm/cli/journey/journey-disable.js +46 -0
- package/esm/cli/journey/journey-disable.js.map +1 -0
- package/esm/cli/journey/journey-enable.js +46 -0
- package/esm/cli/journey/journey-enable.js.map +1 -0
- package/esm/cli/journey/journey-export.js +56 -0
- package/esm/cli/journey/journey-export.js.map +1 -0
- package/esm/cli/journey/journey-import.js +65 -0
- package/esm/cli/journey/journey-import.js.map +1 -0
- package/esm/cli/journey/journey-list.e2e.test_.js.map +1 -0
- package/esm/cli/journey/journey-list.js +27 -0
- package/esm/cli/journey/journey-list.js.map +1 -0
- package/esm/cli/journey/journey-prune.js +41 -0
- package/esm/cli/journey/journey-prune.js.map +1 -0
- package/esm/cli/journey/journey.js +20 -0
- package/esm/cli/journey/journey.js.map +1 -0
- package/esm/cli/logging/logs-list.js +66 -0
- package/esm/cli/logging/logs-list.js.map +1 -0
- package/esm/cli/logging/logs-tail.js +60 -0
- package/esm/cli/logging/logs-tail.js.map +1 -0
- package/esm/cli/logging/logs.js +13 -0
- package/esm/cli/logging/logs.js.map +1 -0
- package/esm/cli/realm/realm-add-custom-domain.js +27 -0
- package/esm/cli/realm/realm-add-custom-domain.js.map +1 -0
- package/esm/cli/realm/realm-describe.js +30 -0
- package/esm/cli/realm/realm-describe.js.map +1 -0
- package/esm/cli/realm/realm-list.js +27 -0
- package/esm/cli/realm/realm-list.js.map +1 -0
- package/esm/cli/realm/realm-remove-custom-domain.js +27 -0
- package/esm/cli/realm/realm-remove-custom-domain.js.map +1 -0
- package/esm/cli/realm/realm.js +18 -0
- package/esm/cli/realm/realm.js.map +1 -0
- package/esm/cli/saml/saml-cot-export.js +44 -0
- package/esm/cli/saml/saml-cot-export.js.map +1 -0
- package/esm/cli/saml/saml-cot-import.js +49 -0
- package/esm/cli/saml/saml-cot-import.js.map +1 -0
- package/esm/cli/saml/saml-cot-list.js +27 -0
- package/esm/cli/saml/saml-cot-list.js.map +1 -0
- package/esm/cli/saml/saml-cot.js +8 -0
- package/esm/cli/saml/saml-cot.js.map +1 -0
- package/esm/cli/saml/saml-describe.js +27 -0
- package/esm/cli/saml/saml-describe.js.map +1 -0
- package/esm/cli/saml/saml-export.js +44 -0
- package/esm/cli/saml/saml-export.js.map +1 -0
- package/esm/cli/saml/saml-import.js +49 -0
- package/esm/cli/saml/saml-import.js.map +1 -0
- package/esm/cli/saml/saml-list.js +27 -0
- package/esm/cli/saml/saml-list.js.map +1 -0
- package/esm/cli/saml/saml-metadata-export.js +39 -0
- package/esm/cli/saml/saml-metadata-export.js.map +1 -0
- package/esm/cli/saml/saml-metadata.js +6 -0
- package/esm/cli/saml/saml-metadata.js.map +1 -0
- package/esm/cli/saml/saml.js +18 -0
- package/esm/cli/saml/saml.js.map +1 -0
- package/esm/cli/script/script-delete.js +22 -0
- package/esm/cli/script/script-delete.js.map +1 -0
- package/esm/cli/script/script-describe.js +22 -0
- package/esm/cli/script/script-describe.js.map +1 -0
- package/esm/cli/script/script-export.js +55 -0
- package/esm/cli/script/script-export.js.map +1 -0
- package/esm/cli/script/script-import.js +28 -0
- package/esm/cli/script/script-import.js.map +1 -0
- package/esm/cli/script/script-list.js +27 -0
- package/esm/cli/script/script-list.js.map +1 -0
- package/esm/cli/script/script.js +17 -0
- package/esm/cli/script/script.js.map +1 -0
- package/esm/cli/theme/theme-delete.e2e.test_.js.map +1 -0
- package/esm/cli/theme/theme-delete.js +44 -0
- package/esm/cli/theme/theme-delete.js.map +1 -0
- package/esm/cli/theme/theme-export.js +49 -0
- package/esm/cli/theme/theme-export.js.map +1 -0
- package/esm/cli/theme/theme-import.js +54 -0
- package/esm/cli/theme/theme-import.js.map +1 -0
- package/esm/cli/theme/theme-list.e2e.test_.js.map +1 -0
- package/esm/cli/theme/theme-list.js +27 -0
- package/esm/cli/theme/theme-list.js.map +1 -0
- package/esm/cli/theme/theme.js +16 -0
- package/esm/cli/theme/theme.js.map +1 -0
- package/esm/ops/CirclesOfTrustOps.js +12 -0
- package/esm/ops/CirclesOfTrustOps.js.map +1 -0
- package/esm/ops/EmailTemplateOps.js +10 -0
- package/esm/ops/EmailTemplateOps.js.map +1 -0
- package/esm/ops/IdpOps.js +10 -0
- package/esm/ops/IdpOps.js.map +1 -0
- package/esm/ops/JourneyOps.js +203 -0
- package/esm/ops/JourneyOps.js.map +1 -0
- package/esm/ops/NodeOps.js +36 -0
- package/esm/ops/NodeOps.js.map +1 -0
- package/esm/ops/Saml2Ops.js +23 -0
- package/esm/ops/Saml2Ops.js.map +1 -0
- package/esm/ops/ScriptOps.js +10 -0
- package/esm/ops/ScriptOps.js.map +1 -0
- package/esm/ops/ThemeOps.js +10 -0
- package/esm/ops/ThemeOps.js.map +1 -0
- package/esm/ops/utils/Wordwrap.js +5 -0
- package/esm/ops/utils/Wordwrap.js.map +1 -0
- package/esm/storage/StaticStorage.js +12 -0
- package/esm/storage/StaticStorage.js.map +1 -0
- package/esm/utils/Config.js +54 -0
- package/esm/utils/Config.js.map +1 -0
- package/esm/utils/Console.js +532 -0
- package/esm/utils/Console.js.map +1 -0
- package/package.json +3 -2
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import fs from 'fs';
|
|
2
|
+
import { Command, Option } from 'commander';
|
|
3
|
+
import { Authenticate, Journey, state } from '@rockcarver/frodo-lib';
|
|
4
|
+
import { describeJourney } from '../../ops/JourneyOps';
|
|
5
|
+
import * as common from '../cmd_common.js';
|
|
6
|
+
const {
|
|
7
|
+
getTokens
|
|
8
|
+
} = Authenticate;
|
|
9
|
+
const {
|
|
10
|
+
getJourneys,
|
|
11
|
+
exportJourney,
|
|
12
|
+
createFileParamTreeExportResolver
|
|
13
|
+
} = Journey;
|
|
14
|
+
const program = new Command('frodo journey describe');
|
|
15
|
+
program.description('If -h is supplied, describe the journey/tree indicated by -i, or all journeys/trees in the realm if no -i is supplied, otherwise describe the journey/tree export file indicated by -f.').helpOption('-h, --help', 'Help').showHelpAfterError().addArgument(common.hostArgument).addArgument(common.realmArgument).addArgument(common.userArgument).addArgument(common.passwordArgument).addOption(common.deploymentOption).addOption(common.insecureOption).addOption(new Option('-i, --journey-id <journey>', 'Name of a journey/tree. If specified, -a and -A are ignored.')).addOption(new Option('-f, --file <file>', 'Name of the file to write the exported journey(s) to. Ignored with -A.')).addOption(new Option('-o, --override-version <version>', "Override version. Notation: '<major>.<minor>.<patch>' e.g. '7.2.0'. Override detected version with any version. This is helpful in order to check if journeys in one environment would be compatible running in another environment (e.g. in preparation of migrating from on-prem to ForgeRock Identity Cloud.")).action( // implement command logic inside action handler
|
|
16
|
+
async (host, realm, user, password, options) => {
|
|
17
|
+
state.default.session.setTenant(host);
|
|
18
|
+
state.default.session.setRealm(realm);
|
|
19
|
+
state.default.session.setUsername(user);
|
|
20
|
+
state.default.session.setPassword(password);
|
|
21
|
+
state.default.session.setDeploymentType(options.type);
|
|
22
|
+
state.default.session.setAllowInsecureConnection(options.insecure); // TODO: review checks for arguments
|
|
23
|
+
|
|
24
|
+
if (typeof host === 'undefined' || typeof options.file !== 'undefined') {
|
|
25
|
+
if (typeof host === 'undefined' && typeof options.file === 'undefined') {
|
|
26
|
+
console.log('Need either [host] or -f.');
|
|
27
|
+
process.exitCode = 1;
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
console.log(`Describing local journey file ${options.file}...`);
|
|
32
|
+
|
|
33
|
+
try {
|
|
34
|
+
var _fileData$tree, _fileData$tree2;
|
|
35
|
+
|
|
36
|
+
// override version
|
|
37
|
+
if (typeof options.overrideVersion !== 'undefined') {
|
|
38
|
+
state.default.session.setAmVersion(options.overrideVersion);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
const fileData = JSON.parse(fs.readFileSync(options.file, 'utf8'));
|
|
42
|
+
let journeyData; // single or multi tree export?
|
|
43
|
+
// multi - by id
|
|
44
|
+
|
|
45
|
+
if (typeof options.journeyId !== 'undefined' && fileData.trees && fileData.trees[options.journeyId]) {
|
|
46
|
+
journeyData = fileData.trees[options.journeyId];
|
|
47
|
+
} // multi - first
|
|
48
|
+
else if (typeof options.journeyId === 'undefined' && fileData.trees) {
|
|
49
|
+
[journeyData] = Object.values(fileData.trees);
|
|
50
|
+
} // single - by id
|
|
51
|
+
else if (typeof options.journeyId !== 'undefined' && options.journeyId === ((_fileData$tree = fileData.tree) === null || _fileData$tree === void 0 ? void 0 : _fileData$tree._id)) {
|
|
52
|
+
journeyData = fileData;
|
|
53
|
+
} // single
|
|
54
|
+
else if (typeof options.journeyId === 'undefined' && (_fileData$tree2 = fileData.tree) !== null && _fileData$tree2 !== void 0 && _fileData$tree2._id) {
|
|
55
|
+
journeyData = fileData;
|
|
56
|
+
} // no journey/tree found
|
|
57
|
+
else {
|
|
58
|
+
throw new Error(typeof options.journeyId === 'undefined' ? `No journey found in ${options.file}` : `Journey '${options.journeyId}' not found in ${options.file}`);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
describeJourney(journeyData, createFileParamTreeExportResolver(options.file));
|
|
62
|
+
} catch (error) {
|
|
63
|
+
console.log(error.message);
|
|
64
|
+
process.exitCode = 1;
|
|
65
|
+
}
|
|
66
|
+
} else if (await getTokens()) {
|
|
67
|
+
console.log(`Describing journey(s) in realm "${state.default.session.getRealm()}"...`); // override version
|
|
68
|
+
|
|
69
|
+
if (typeof options.overrideVersion !== 'undefined') {
|
|
70
|
+
state.default.session.setAmVersion(options.overrideVersion);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
if (typeof options.journeyId === 'undefined') {
|
|
74
|
+
let journeys = [];
|
|
75
|
+
journeys = await getJourneys();
|
|
76
|
+
|
|
77
|
+
for (const journey of journeys) {
|
|
78
|
+
try {
|
|
79
|
+
// eslint-disable-next-line no-await-in-loop, dot-notation
|
|
80
|
+
const treeData = await exportJourney(journey['_id']);
|
|
81
|
+
describeJourney(treeData);
|
|
82
|
+
} catch (error) {
|
|
83
|
+
console.log(error.message);
|
|
84
|
+
process.exitCode = 1;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
} else {
|
|
88
|
+
try {
|
|
89
|
+
const treeData = await exportJourney(options.journeyId);
|
|
90
|
+
describeJourney(treeData);
|
|
91
|
+
} catch (error) {
|
|
92
|
+
console.log(error.message);
|
|
93
|
+
process.exitCode = 1;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
} // end command logic inside action handler
|
|
98
|
+
);
|
|
99
|
+
program.parse();
|
|
100
|
+
//# sourceMappingURL=journey-describe.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"journey-describe.js","names":["fs","Command","Option","Authenticate","Journey","state","describeJourney","common","getTokens","getJourneys","exportJourney","createFileParamTreeExportResolver","program","description","helpOption","showHelpAfterError","addArgument","hostArgument","realmArgument","userArgument","passwordArgument","addOption","deploymentOption","insecureOption","action","host","realm","user","password","options","default","session","setTenant","setRealm","setUsername","setPassword","setDeploymentType","type","setAllowInsecureConnection","insecure","file","console","log","process","exitCode","overrideVersion","setAmVersion","fileData","JSON","parse","readFileSync","journeyData","journeyId","trees","Object","values","tree","_id","Error","error","message","getRealm","journeys","journey","treeData"],"sources":["cli/journey/journey-describe.ts"],"sourcesContent":["import fs from 'fs';\nimport { Command, Option } from 'commander';\nimport { Authenticate, Journey, state } from '@rockcarver/frodo-lib';\nimport { describeJourney } from '../../ops/JourneyOps';\nimport * as common from '../cmd_common.js';\n\nconst { getTokens } = Authenticate;\nconst { getJourneys, exportJourney, createFileParamTreeExportResolver } =\n Journey;\n\nconst program = new Command('frodo journey describe');\n\nprogram\n .description(\n 'If -h is supplied, describe the journey/tree indicated by -i, or all journeys/trees in the realm if no -i is supplied, otherwise describe the journey/tree export file indicated by -f.'\n )\n .helpOption('-h, --help', 'Help')\n .showHelpAfterError()\n .addArgument(common.hostArgument)\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, --journey-id <journey>',\n 'Name of a journey/tree. 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 journey(s) to. Ignored with -A.'\n )\n )\n .addOption(\n new Option(\n '-o, --override-version <version>',\n \"Override version. Notation: '<major>.<minor>.<patch>' e.g. '7.2.0'. Override detected version with any version. This is helpful in order to check if journeys in one environment would be compatible running in another environment (e.g. in preparation of migrating from on-prem to ForgeRock Identity Cloud.\"\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 // TODO: review checks for arguments\n if (typeof host === 'undefined' || typeof options.file !== 'undefined') {\n if (\n typeof host === 'undefined' &&\n typeof options.file === 'undefined'\n ) {\n console.log('Need either [host] or -f.');\n process.exitCode = 1;\n return;\n }\n console.log(`Describing local journey file ${options.file}...`);\n try {\n // override version\n if (typeof options.overrideVersion !== 'undefined') {\n state.default.session.setAmVersion(options.overrideVersion);\n }\n const fileData = JSON.parse(fs.readFileSync(options.file, 'utf8'));\n let journeyData;\n // single or multi tree export?\n // multi - by id\n if (\n typeof options.journeyId !== 'undefined' &&\n fileData.trees &&\n fileData.trees[options.journeyId]\n ) {\n journeyData = fileData.trees[options.journeyId];\n }\n // multi - first\n else if (typeof options.journeyId === 'undefined' && fileData.trees) {\n [journeyData] = Object.values(fileData.trees);\n }\n // single - by id\n else if (\n typeof options.journeyId !== 'undefined' &&\n options.journeyId === fileData.tree?._id\n ) {\n journeyData = fileData;\n }\n // single\n else if (\n typeof options.journeyId === 'undefined' &&\n fileData.tree?._id\n ) {\n journeyData = fileData;\n }\n // no journey/tree found\n else {\n throw new Error(\n typeof options.journeyId === 'undefined'\n ? `No journey found in ${options.file}`\n : `Journey '${options.journeyId}' not found in ${options.file}`\n );\n }\n describeJourney(\n journeyData,\n createFileParamTreeExportResolver(options.file)\n );\n } catch (error) {\n console.log(error.message);\n process.exitCode = 1;\n }\n } else if (await getTokens()) {\n console.log(\n `Describing journey(s) in realm \"${state.default.session.getRealm()}\"...`\n );\n // override version\n if (typeof options.overrideVersion !== 'undefined') {\n state.default.session.setAmVersion(options.overrideVersion);\n }\n if (typeof options.journeyId === 'undefined') {\n let journeys: any[] = [];\n journeys = await getJourneys();\n for (const journey of journeys) {\n try {\n // eslint-disable-next-line no-await-in-loop, dot-notation\n const treeData = await exportJourney(journey['_id']);\n describeJourney(treeData);\n } catch (error) {\n console.log(error.message);\n process.exitCode = 1;\n }\n }\n } else {\n try {\n const treeData = await exportJourney(options.journeyId);\n describeJourney(treeData);\n } catch (error) {\n console.log(error.message);\n process.exitCode = 1;\n }\n }\n }\n }\n // end command logic inside action handler\n );\n\nprogram.parse();\n"],"mappings":"AAAA,OAAOA,EAAP,MAAe,IAAf;AACA,SAASC,OAAT,EAAkBC,MAAlB,QAAgC,WAAhC;AACA,SAASC,YAAT,EAAuBC,OAAvB,EAAgCC,KAAhC,QAA6C,uBAA7C;AACA,SAASC,eAAT,QAAgC,sBAAhC;AACA,OAAO,KAAKC,MAAZ,MAAwB,kBAAxB;AAEA,MAAM;EAAEC;AAAF,IAAgBL,YAAtB;AACA,MAAM;EAAEM,WAAF;EAAeC,aAAf;EAA8BC;AAA9B,IACJP,OADF;AAGA,MAAMQ,OAAO,GAAG,IAAIX,OAAJ,CAAY,wBAAZ,CAAhB;AAEAW,OAAO,CACJC,WADH,CAEI,yLAFJ,EAIGC,UAJH,CAIc,YAJd,EAI4B,MAJ5B,EAKGC,kBALH,GAMGC,WANH,CAMeT,MAAM,CAACU,YANtB,EAOGD,WAPH,CAOeT,MAAM,CAACW,aAPtB,EAQGF,WARH,CAQeT,MAAM,CAACY,YARtB,EASGH,WATH,CASeT,MAAM,CAACa,gBATtB,EAUGC,SAVH,CAUad,MAAM,CAACe,gBAVpB,EAWGD,SAXH,CAWad,MAAM,CAACgB,cAXpB,EAYGF,SAZH,CAaI,IAAInB,MAAJ,CACE,4BADF,EAEE,8DAFF,CAbJ,EAkBGmB,SAlBH,CAmBI,IAAInB,MAAJ,CACE,mBADF,EAEE,wEAFF,CAnBJ,EAwBGmB,SAxBH,CAyBI,IAAInB,MAAJ,CACE,kCADF,EAEE,iTAFF,CAzBJ,EA8BGsB,MA9BH,EA+BI;AACA,OAAOC,IAAP,EAAaC,KAAb,EAAoBC,IAApB,EAA0BC,QAA1B,EAAoCC,OAApC,KAAgD;EAC9CxB,KAAK,CAACyB,OAAN,CAAcC,OAAd,C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IACA,IAAI,OAAOhC,OAAO,CAACgB,eAAf,KAAmC,WAAvC,EAAoD;MAClDxC,KAAK,CAACyB,OAAN,CAAcC,OAAd,CAAsBe,YAAtB,CAAmCjB,OAAO,CAACgB,eAA3C;IACD;;IACD,IAAI,OAAOhB,OAAO,CAACuB,SAAf,KAA6B,WAAjC,EAA8C;MAC5C,IAAIU,QAAe,GAAG,EAAtB;MACAA,QAAQ,GAAG,MAAMrD,WAAW,EAA5B;;MACA,KAAK,MAAMsD,OAAX,IAAsBD,QAAtB,EAAgC;QAC9B,IAAI;UACF;UACA,MAAME,QAAQ,GAAG,MAAMtD,aAAa,CAACqD,OAAO,CAAC,KAAD,CAAR,CAApC;UACAzD,eAAe,CAAC0D,QAAD,CAAf;QACD,CAJD,CAIE,OAAOL,KAAP,EAAc;UACdlB,OAAO,CAACC,GAAR,CAAYiB,KAAK,CAACC,OAAlB;UACAjB,OAAO,CAACC,QAAR,GAAmB,CAAnB;QACD;MACF;IACF,CAbD,MAaO;MACL,IAAI;QACF,MAAMoB,QAAQ,GAAG,MAAMtD,aAAa,CAACmB,OAAO,CAACuB,SAAT,CAApC;QACA9C,eAAe,CAAC0D,QAAD,CAAf;MACD,CAHD,CAGE,OAAOL,KAAP,EAAc;QACdlB,OAAO,CAACC,GAAR,CAAYiB,KAAK,CAACC,OAAlB;QACAjB,OAAO,CAACC,QAAR,GAAmB,CAAnB;MACD;IACF;EACF;AACF,CAnIL,CAoII;AApIJ;AAuIAhC,OAAO,CAACqC,KAAR"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { Command, Option } from 'commander';
|
|
2
|
+
import { Authenticate, Journey, state } from '@rockcarver/frodo-lib';
|
|
3
|
+
import * as common from '../cmd_common.js';
|
|
4
|
+
import { showSpinner, failSpinner, succeedSpinner } from '../../utils/Console';
|
|
5
|
+
const {
|
|
6
|
+
getTokens
|
|
7
|
+
} = Authenticate;
|
|
8
|
+
const {
|
|
9
|
+
disableJourney
|
|
10
|
+
} = Journey;
|
|
11
|
+
const program = new Command('frodo journey disable');
|
|
12
|
+
program.description('Disable journeys/trees.').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('-i, --journey-id <journey>', 'Name of a journey/tree.')) // .addOption(
|
|
13
|
+
// new Option(
|
|
14
|
+
// '-a, --all',
|
|
15
|
+
// 'Disable all the journeys/trees in a realm. Ignored with -i.'
|
|
16
|
+
// )
|
|
17
|
+
// )
|
|
18
|
+
.action( // implement command logic inside action handler
|
|
19
|
+
async (host, realm, user, password, options) => {
|
|
20
|
+
state.default.session.setTenant(host);
|
|
21
|
+
state.default.session.setRealm(realm);
|
|
22
|
+
state.default.session.setUsername(user);
|
|
23
|
+
state.default.session.setPassword(password);
|
|
24
|
+
state.default.session.setDeploymentType(options.type);
|
|
25
|
+
state.default.session.setAllowInsecureConnection(options.insecure);
|
|
26
|
+
|
|
27
|
+
if (await getTokens()) {
|
|
28
|
+
// enable
|
|
29
|
+
if (options.journeyId) {
|
|
30
|
+
showSpinner(`Disabling journey ${options.journeyId}...`);
|
|
31
|
+
|
|
32
|
+
if (await disableJourney(options.journeyId)) {
|
|
33
|
+
succeedSpinner(`Disabled journey ${options.journeyId}.`);
|
|
34
|
+
} else {
|
|
35
|
+
failSpinner(`Disabling journey ${options.journeyId} failed.`);
|
|
36
|
+
}
|
|
37
|
+
} // unrecognized combination of options or no options
|
|
38
|
+
else {
|
|
39
|
+
console.log('Unrecognized combination of options or no options...');
|
|
40
|
+
program.help();
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
} // end command logic inside action handler
|
|
44
|
+
);
|
|
45
|
+
program.parse();
|
|
46
|
+
//# sourceMappingURL=journey-disable.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"journey-disable.js","names":["Command","Option","Authenticate","Journey","state","common","showSpinner","failSpinner","succeedSpinner","getTokens","disableJourney","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","journeyId","console","log","help","parse"],"sources":["cli/journey/journey-disable.ts"],"sourcesContent":["import fs from 'fs';\nimport { Command, Option } from 'commander';\nimport { Authenticate, Journey, state } from '@rockcarver/frodo-lib';\nimport * as common from '../cmd_common.js';\nimport { showSpinner, failSpinner, succeedSpinner } from '../../utils/Console';\n\nconst { getTokens } = Authenticate;\nconst { disableJourney } =\n Journey;\n\nconst program = new Command('frodo journey disable');\n\nprogram\n .description(\n 'Disable journeys/trees.'\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(\n '-i, --journey-id <journey>',\n 'Name of a journey/tree.'\n )\n )\n // .addOption(\n // new Option(\n // '-a, --all',\n // 'Disable all the journeys/trees in a realm. Ignored with -i.'\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 // enable\n if (options.journeyId) {\n showSpinner(`Disabling journey ${options.journeyId}...`);\n if (await disableJourney(options.journeyId)) {\n succeedSpinner(`Disabled journey ${options.journeyId}.`);\n } else {\n failSpinner(`Disabling journey ${options.journeyId} failed.`);\n }\n }\n // unrecognized combination of options or no options\n else {\n console.log('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":"AACA,SAASA,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AO,CAACQ,IAAhD;EACAhC,KAAK,CAACyB,OAAN,CAAcC,OAAd,CAAsBO,0BAAtB,CAAiDT,OAAO,CAACU,QAAzD;;EACA,IAAI,MAAM7B,SAAS,EAAnB,EAAuB;IACrB;IACA,IAAImB,OAAO,CAACW,SAAZ,EAAuB;MACrBjC,WAAW,CAAE,qBAAoBsB,OAAO,CAACW,SAAU,KAAxC,CAAX;;MACA,IAAI,MAAM7B,cAAc,CAACkB,OAAO,CAACW,SAAT,CAAxB,EAA6C;QAC3C/B,cAAc,CAAE,oBAAmBoB,OAAO,CAACW,SAAU,GAAvC,CAAd;MACD,CAFD,MAEO;QACLhC,WAAW,CAAE,qBAAoBqB,OAAO,CAACW,SAAU,UAAxC,CAAX;MACD;IACF,CAPD,CAQA;IARA,KASK;MACHC,OAAO,CAACC,GAAR,CAAY,sDAAZ;MACA9B,OAAO,CAAC+B,IAAR;IACD;EACF;AACF,CAjDL,CAkDI;AAlDJ;AAqDA/B,OAAO,CAACgC,KAAR"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { Command, Option } from 'commander';
|
|
2
|
+
import { Authenticate, Journey, state } from '@rockcarver/frodo-lib';
|
|
3
|
+
import * as common from '../cmd_common.js';
|
|
4
|
+
import { showSpinner, failSpinner, succeedSpinner } from '../../utils/Console';
|
|
5
|
+
const {
|
|
6
|
+
getTokens
|
|
7
|
+
} = Authenticate;
|
|
8
|
+
const {
|
|
9
|
+
enableJourney
|
|
10
|
+
} = Journey;
|
|
11
|
+
const program = new Command('frodo journey enable');
|
|
12
|
+
program.description('Enable journeys/trees.').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('-i, --journey-id <journey>', 'Name of a journey/tree.')) // .addOption(
|
|
13
|
+
// new Option(
|
|
14
|
+
// '-a, --all',
|
|
15
|
+
// 'Enable all the journeys/trees in a realm. Ignored with -i.'
|
|
16
|
+
// )
|
|
17
|
+
// )
|
|
18
|
+
.action( // implement command logic inside action handler
|
|
19
|
+
async (host, realm, user, password, options) => {
|
|
20
|
+
state.default.session.setTenant(host);
|
|
21
|
+
state.default.session.setRealm(realm);
|
|
22
|
+
state.default.session.setUsername(user);
|
|
23
|
+
state.default.session.setPassword(password);
|
|
24
|
+
state.default.session.setDeploymentType(options.type);
|
|
25
|
+
state.default.session.setAllowInsecureConnection(options.insecure);
|
|
26
|
+
|
|
27
|
+
if (await getTokens()) {
|
|
28
|
+
// enable
|
|
29
|
+
if (options.journeyId) {
|
|
30
|
+
showSpinner(`Enabling journey ${options.journeyId}...`);
|
|
31
|
+
|
|
32
|
+
if (await enableJourney(options.journeyId)) {
|
|
33
|
+
succeedSpinner(`Enabled journey ${options.journeyId}.`);
|
|
34
|
+
} else {
|
|
35
|
+
failSpinner(`Enabling journey ${options.journeyId} failed.`);
|
|
36
|
+
}
|
|
37
|
+
} // unrecognized combination of options or no options
|
|
38
|
+
else {
|
|
39
|
+
console.log('Unrecognized combination of options or no options...');
|
|
40
|
+
program.help();
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
} // end command logic inside action handler
|
|
44
|
+
);
|
|
45
|
+
program.parse();
|
|
46
|
+
//# sourceMappingURL=journey-enable.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"journey-enable.js","names":["Command","Option","Authenticate","Journey","state","common","showSpinner","failSpinner","succeedSpinner","getTokens","enableJourney","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","journeyId","console","log","help","parse"],"sources":["cli/journey/journey-enable.ts"],"sourcesContent":["import fs from 'fs';\nimport { Command, Option } from 'commander';\nimport { Authenticate, Journey, state } from '@rockcarver/frodo-lib';\nimport * as common from '../cmd_common.js';\nimport { showSpinner, failSpinner, succeedSpinner } from '../../utils/Console';\n\nconst { getTokens } = Authenticate;\nconst { enableJourney } = Journey;\n\nconst program = new Command('frodo journey enable');\n\nprogram\n .description('Enable journeys/trees.')\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, --journey-id <journey>',\n 'Name of a journey/tree.'\n )\n )\n // .addOption(\n // new Option(\n // '-a, --all',\n // 'Enable all the journeys/trees in a realm. Ignored with -i.'\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 // enable\n if (options.journeyId) {\n showSpinner(`Enabling journey ${options.journeyId}...`);\n if (await enableJourney(options.journeyId)) {\n succeedSpinner(`Enabled journey ${options.journeyId}.`);\n } else {\n failSpinner(`Enabling journey ${options.journeyId} failed.`);\n }\n }\n // unrecognized combination of options or no options\n else {\n console.log('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":"AACA,SAASA,OAAT,EAAkBC,MAAlB,QAAgC,WAAhC;AACA,SAASC,YAAT,EAAuBC,OAAvB,EAAgCC,KAAhC,QAA6C,uBAA7C;AACA,OAAO,KAAKC,MAAZ,MAAwB,kBAAxB;AACA,SAASC,WAAT,EAAsBC,WAAtB,EAAmCC,cAAnC,QAAyD,qBAAzD;AAEA,MAAM;EAAEC;AAAF,IAAgBP,YAAtB;AACA,MAAM;EAAEQ;AAAF,IAAoBP,OAA1B;AAEA,MAAMQ,OAAO,GAAG,IAAIX,OAA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cAAc,CAAE,mBAAkBoB,OAAO,CAACW,SAAU,GAAtC,CAAd;MACD,CAFD,MAEO;QACLhC,WAAW,CAAE,oBAAmBqB,OAAO,CAACW,SAAU,UAAvC,CAAX;MACD;IACF,CAPD,CAQA;IARA,KASK;MACHC,OAAO,CAACC,GAAR,CAAY,sDAAZ;MACA9B,OAAO,CAAC+B,IAAR;IACD;EACF;AACF,CA/CL,CAgDI;AAhDJ;AAmDA/B,OAAO,CAACgC,KAAR"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { Command, Option } from 'commander';
|
|
2
|
+
import { Authenticate, Journey, state } from '@rockcarver/frodo-lib';
|
|
3
|
+
import * as common from '../cmd_common.js';
|
|
4
|
+
const {
|
|
5
|
+
getTokens
|
|
6
|
+
} = Authenticate;
|
|
7
|
+
const {
|
|
8
|
+
exportJourneyToFile,
|
|
9
|
+
exportJourneysToFile,
|
|
10
|
+
exportJourneysToFiles
|
|
11
|
+
} = Journey;
|
|
12
|
+
const program = new Command('frodo journey export');
|
|
13
|
+
program.description('Export journeys/trees.').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('-i, --journey-id <journey>', 'Name of a journey/tree. If specified, -a and -A are ignored.')).addOption(new Option('-f, --file <file>', 'Name of the file to write the exported journey(s) to. Ignored with -A.')).addOption(new Option('-a, --all', 'Export all the journeys/trees in a realm. Ignored with -i.')).addOption(new Option('-A, --all-separate', 'Export all the journeys/trees in a realm as separate files <journey/tree name>.json. Ignored with -i or -a.')).addOption(new Option('--use-string-arrays', 'Where applicable, use string arrays to store multi-line text (e.g. scripts).').default(false, 'off')).addOption(new Option('--no-deps', 'Do not include any dependencies (scripts, email templates, SAML entity providers and circles of trust, social identity providers, themes).')).addOption(new Option('--verbose', 'Verbose output during command execution. If specified, may or may not produce additional output.').default(false, 'off')).action( // implement command logic inside action handler
|
|
14
|
+
async (host, realm, user, password, options) => {
|
|
15
|
+
state.default.session.setTenant(host);
|
|
16
|
+
state.default.session.setRealm(realm);
|
|
17
|
+
state.default.session.setUsername(user);
|
|
18
|
+
state.default.session.setPassword(password);
|
|
19
|
+
state.default.session.setDeploymentType(options.type);
|
|
20
|
+
state.default.session.setAllowInsecureConnection(options.insecure);
|
|
21
|
+
|
|
22
|
+
if (await getTokens()) {
|
|
23
|
+
// export
|
|
24
|
+
if (options.journeyId) {
|
|
25
|
+
console.log('Exporting journey...');
|
|
26
|
+
await exportJourneyToFile(options.journeyId, options.file, {
|
|
27
|
+
useStringArrays: options.useStringArrays,
|
|
28
|
+
deps: options.deps,
|
|
29
|
+
verbose: options.verbose
|
|
30
|
+
});
|
|
31
|
+
} // --all -a
|
|
32
|
+
else if (options.all) {
|
|
33
|
+
console.log('Exporting all journeys to a single file...');
|
|
34
|
+
await exportJourneysToFile(options.file, {
|
|
35
|
+
useStringArrays: options.useStringArrays,
|
|
36
|
+
deps: options.deps,
|
|
37
|
+
verbose: options.verbose
|
|
38
|
+
});
|
|
39
|
+
} // --all-separate -A
|
|
40
|
+
else if (options.allSeparate) {
|
|
41
|
+
console.log('Exporting all journeys to separate files...');
|
|
42
|
+
await exportJourneysToFiles({
|
|
43
|
+
useStringArrays: options.useStringArrays,
|
|
44
|
+
deps: options.deps,
|
|
45
|
+
verbose: options.verbose
|
|
46
|
+
});
|
|
47
|
+
} // unrecognized combination of options or no options
|
|
48
|
+
else {
|
|
49
|
+
console.log('Unrecognized combination of options or no options...');
|
|
50
|
+
program.help();
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
} // end command logic inside action handler
|
|
54
|
+
);
|
|
55
|
+
program.parse();
|
|
56
|
+
//# sourceMappingURL=journey-export.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"journey-export.js","names":["Command","Option","Authenticate","Journey","state","common","getTokens","exportJourneyToFile","exportJourneysToFile","exportJourneysToFiles","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","journeyId","console","log","file","useStringArrays","deps","verbose","all","allSeparate","help","parse"],"sources":["cli/journey/journey-export.ts"],"sourcesContent":["import { Command, Option } from 'commander';\nimport { Authenticate, Journey, state } from '@rockcarver/frodo-lib';\nimport * as common from '../cmd_common.js';\n\nconst { getTokens } = Authenticate;\nconst { exportJourneyToFile, exportJourneysToFile, exportJourneysToFiles } =\n Journey;\n\nconst program = new Command('frodo journey export');\n\nprogram\n .description('Export journeys/trees.')\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, --journey-id <journey>',\n 'Name of a journey/tree. 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 journey(s) to. Ignored with -A.'\n )\n )\n .addOption(\n new Option(\n '-a, --all',\n 'Export all the journeys/trees in a realm. Ignored with -i.'\n )\n )\n .addOption(\n new Option(\n '-A, --all-separate',\n 'Export all the journeys/trees in a realm as separate files <journey/tree name>.json. Ignored with -i or -a.'\n )\n )\n .addOption(\n new Option(\n '--use-string-arrays',\n 'Where applicable, use string arrays to store multi-line text (e.g. scripts).'\n ).default(false, 'off')\n )\n .addOption(\n new Option(\n '--no-deps',\n 'Do not include any dependencies (scripts, email templates, SAML entity providers and circles of trust, social identity providers, themes).'\n )\n )\n .addOption(\n new Option(\n '--verbose',\n 'Verbose output during command execution. If specified, may or may not produce additional output.'\n ).default(false, 'off')\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\n if (options.journeyId) {\n console.log('Exporting journey...');\n await exportJourneyToFile(options.journeyId, options.file, {\n useStringArrays: options.useStringArrays,\n deps: options.deps,\n verbose: options.verbose,\n });\n }\n // --all -a\n else if (options.all) {\n console.log('Exporting all journeys to a single file...');\n await exportJourneysToFile(options.file, {\n useStringArrays: options.useStringArrays,\n deps: options.deps,\n verbose: options.verbose,\n });\n }\n // --all-separate -A\n else if (options.allSeparate) {\n console.log('Exporting all journeys to separate files...');\n await exportJourneysToFiles({\n useStringArrays: options.useStringArrays,\n deps: options.deps,\n verbose: options.verbose,\n });\n }\n // unrecognized combination of options or no options\n else {\n console.log('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,OAAvB,EAAgCC,KAAhC,QAA6C,uBAA7C;AACA,OAAO,KAAKC,MAAZ,MAAwB,kBAAxB;AAEA,MAAM;EAAEC;AAAF,IAAgBJ,YAAtB;AACA,MAAM;EAAEK,mBAAF;EAAuBC,oBAAvB;EAA6CC;AAA7C,IACJN,OADF;AAGA,MAAMO,OAAO,GAAG,IAAIV,OAAJ,CAAY,sBAAZ,CAAhB;AAEAU,OAAO,CACJC,WADH,CACe,wBADf,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,cATp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AO,CAACC,GAAR,CAAY,sBAAZ;MACA,MAAMjC,mBAAmB,CAACqB,OAAO,CAACU,SAAT,EAAoBV,OAAO,CAACa,IAA5B,EAAkC;QACzDC,eAAe,EAAEd,OAAO,CAACc,eADgC;QAEzDC,IAAI,EAAEf,OAAO,CAACe,IAF2C;QAGzDC,OAAO,EAAEhB,OAAO,CAACgB;MAHwC,CAAlC,CAAzB;IAKD,CAPD,CAQA;IARA,KASK,IAAIhB,OAAO,CAACiB,GAAZ,EAAiB;MACpBN,OAAO,CAACC,GAAR,CAAY,4CAAZ;MACA,MAAMhC,oBAAoB,CAACoB,OAAO,CAACa,IAAT,EAAe;QACvCC,eAAe,EAAEd,OAAO,CAACc,eADc;QAEvCC,IAAI,EAAEf,OAAO,CAACe,IAFyB;QAGvCC,OAAO,EAAEhB,OAAO,CAACgB;MAHsB,CAAf,CAA1B;IAKD,CAPI,CAQL;IARK,KASA,IAAIhB,OAAO,CAACkB,WAAZ,EAAyB;MAC5BP,OAAO,CAACC,GAAR,CAAY,6CAAZ;MACA,MAAM/B,qBAAqB,CAAC;QAC1BiC,eAAe,EAAEd,OAAO,CAACc,eADC;QAE1BC,IAAI,EAAEf,OAAO,CAACe,IAFY;QAG1BC,OAAO,EAAEhB,OAAO,CAACgB;MAHS,CAAD,CAA3B;IAKD,CAPI,CAQL;IARK,KASA;MACHL,OAAO,CAACC,GAAR,CAAY,sDAAZ;MACA9B,OAAO,CAACqC,IAAR;IACD;EACF;AACF,CA/FL,CAgGI;AAhGJ;AAmGArC,OAAO,CAACsC,KAAR"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { Command, Option } from 'commander';
|
|
2
|
+
import { Authenticate, Journey, state } from '@rockcarver/frodo-lib';
|
|
3
|
+
import * as common from '../cmd_common.js';
|
|
4
|
+
const {
|
|
5
|
+
getTokens
|
|
6
|
+
} = Authenticate;
|
|
7
|
+
const {
|
|
8
|
+
importJourneyFromFile,
|
|
9
|
+
importJourneysFromFile,
|
|
10
|
+
importJourneysFromFiles,
|
|
11
|
+
importFirstJourneyFromFile
|
|
12
|
+
} = Journey;
|
|
13
|
+
const program = new Command('frodo journey import');
|
|
14
|
+
program.description('Import journey/tree.').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('-i, --journey-id <journey>', 'Name of a journey/tree. If specified, -a and -A are ignored.')).addOption(new Option('-f, --file <file>', 'Name of the file to import the journey(s) from. Ignored with -A.')).addOption(new Option('-a, --all', 'Import all the journeys/trees from single file. Ignored with -i.')).addOption(new Option('-A, --all-separate', 'Import all the journeys/trees from separate files (*.json) in the current directory. Ignored with -i or -a.')).addOption(new Option('--re-uuid', 'Generate new UUIDs for all nodes during import.').default(false, 'off')).addOption(new Option('--no-deps', 'Do not include any dependencies (scripts, email templates, SAML entity providers and circles of trust, social identity providers, themes).')).addOption(new Option('--verbose', 'Verbose output during command execution. If specified, may or may not produce additional output.').default(false, 'off')).action( // implement command logic inside action handler
|
|
15
|
+
async (host, realm, user, password, options) => {
|
|
16
|
+
state.default.session.setTenant(host);
|
|
17
|
+
state.default.session.setRealm(realm);
|
|
18
|
+
state.default.session.setUsername(user);
|
|
19
|
+
state.default.session.setPassword(password);
|
|
20
|
+
state.default.session.setDeploymentType(options.type);
|
|
21
|
+
state.default.session.setAllowInsecureConnection(options.insecure);
|
|
22
|
+
|
|
23
|
+
if (await getTokens()) {
|
|
24
|
+
// import
|
|
25
|
+
if (options.journeyId) {
|
|
26
|
+
console.log(`Importing journey ${options.journeyId}...`);
|
|
27
|
+
importJourneyFromFile(options.journeyId, options.file, {
|
|
28
|
+
reUuid: options.reUuid,
|
|
29
|
+
deps: options.deps,
|
|
30
|
+
verbose: options.verbose
|
|
31
|
+
});
|
|
32
|
+
} // --all -a
|
|
33
|
+
else if (options.all && options.file) {
|
|
34
|
+
console.log(`Importing all journeys from a single file (${options.file})...`);
|
|
35
|
+
importJourneysFromFile(options.file, {
|
|
36
|
+
reUuid: options.reUuid,
|
|
37
|
+
deps: options.deps,
|
|
38
|
+
verbose: options.verbose
|
|
39
|
+
});
|
|
40
|
+
} // --all-separate -A
|
|
41
|
+
else if (options.allSeparate && !options.file) {
|
|
42
|
+
console.log('Importing all journeys from separate files in current directory...');
|
|
43
|
+
importJourneysFromFiles({
|
|
44
|
+
reUuid: options.reUuid,
|
|
45
|
+
deps: options.deps,
|
|
46
|
+
verbose: options.verbose
|
|
47
|
+
});
|
|
48
|
+
} // import first journey in file
|
|
49
|
+
else if (options.file) {
|
|
50
|
+
console.log('Importing first journey in file...');
|
|
51
|
+
importFirstJourneyFromFile(options.file, {
|
|
52
|
+
reUuid: options.reUuid,
|
|
53
|
+
deps: options.deps,
|
|
54
|
+
verbose: options.verbose
|
|
55
|
+
});
|
|
56
|
+
} // unrecognized combination of options or no options
|
|
57
|
+
else {
|
|
58
|
+
console.log('Unrecognized combination of options or no options...');
|
|
59
|
+
program.help();
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
} // end command logic inside action handler
|
|
63
|
+
);
|
|
64
|
+
program.parse();
|
|
65
|
+
//# sourceMappingURL=journey-import.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"journey-import.js","names":["Command","Option","Authenticate","Journey","state","common","getTokens","importJourneyFromFile","importJourneysFromFile","importJourneysFromFiles","importFirstJourneyFromFile","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","journeyId","console","log","file","reUuid","deps","verbose","all","allSeparate","help","parse"],"sources":["cli/journey/journey-import.ts"],"sourcesContent":["import { Command, Option } from 'commander';\nimport { Authenticate, Journey, state } from '@rockcarver/frodo-lib';\nimport * as common from '../cmd_common.js';\n\nconst { getTokens } = Authenticate;\nconst {\n importJourneyFromFile,\n importJourneysFromFile,\n importJourneysFromFiles,\n importFirstJourneyFromFile,\n} = Journey;\n\nconst program = new Command('frodo journey import');\n\nprogram\n .description('Import journey/tree.')\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, --journey-id <journey>',\n 'Name of a journey/tree. 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 journey(s) from. Ignored with -A.'\n )\n )\n .addOption(\n new Option(\n '-a, --all',\n 'Import all the journeys/trees from single file. Ignored with -i.'\n )\n )\n .addOption(\n new Option(\n '-A, --all-separate',\n 'Import all the journeys/trees from separate files (*.json) in the current directory. Ignored with -i or -a.'\n )\n )\n .addOption(\n new Option(\n '--re-uuid',\n 'Generate new UUIDs for all nodes during import.'\n ).default(false, 'off')\n )\n .addOption(\n new Option(\n '--no-deps',\n 'Do not include any dependencies (scripts, email templates, SAML entity providers and circles of trust, social identity providers, themes).'\n )\n )\n .addOption(\n new Option(\n '--verbose',\n 'Verbose output during command execution. If specified, may or may not produce additional output.'\n ).default(false, 'off')\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\n if (options.journeyId) {\n console.log(`Importing journey ${options.journeyId}...`);\n importJourneyFromFile(options.journeyId, options.file, {\n reUuid: options.reUuid,\n deps: options.deps,\n verbose: options.verbose,\n });\n }\n // --all -a\n else if (options.all && options.file) {\n console.log(\n `Importing all journeys from a single file (${options.file})...`\n );\n importJourneysFromFile(options.file, {\n reUuid: options.reUuid,\n deps: options.deps,\n verbose: options.verbose,\n });\n }\n // --all-separate -A\n else if (options.allSeparate && !options.file) {\n console.log(\n 'Importing all journeys from separate files in current directory...'\n );\n importJourneysFromFiles({\n reUuid: options.reUuid,\n deps: options.deps,\n verbose: options.verbose,\n });\n }\n // import first journey in file\n else if (options.file) {\n console.log('Importing first journey in file...');\n importFirstJourneyFromFile(options.file, {\n reUuid: options.reUuid,\n deps: options.deps,\n verbose: options.verbose,\n });\n }\n // unrecognized combination of options or no options\n else {\n console.log('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,OAAvB,EAAgCC,KAAhC,QAA6C,uBAA7C;AACA,OAAO,KAAKC,MAAZ,MAAwB,kBAAxB;AAEA,MAAM;EAAEC;AAAF,IAAgBJ,YAAtB;AACA,MAAM;EACJK,qBADI;EAEJC,sBAFI;EAGJC,uBAHI;EAIJC;AAJI,IAKFP,OALJ;AAOA,MAAMQ,OAAO,GAAG,IAAIX,OAAJ,CAAY,sBAAZ,CAAhB;AAEAW,OAAO,CACJC,WADH,CACe,sBADf,EAEGC,UAFH,CAEc,YAFd,EAE4B,MAF5B,EAGGC,kBAHH,GAIGC,WAJH,CAIeV,MAAM,CAACW,aAJtB,EAKGD,WALH,CAKeV,MAAM,CAACY,aALtB,EAMGF,WANH,CAMeV,MAAM,CAACa,YANtB,EAOGH,WAPH,CAOeV,MAAM,CAACc,gBAPtB,EAQGC,SARH,CAQaf,MAAM,CAACgB,gBARpB,EASGD,SATH,CASaf,MAAM,CAACiB,cATpB,EAUGF,SAVH,CAWI,IAAInB,MAAJ,CACE,4BADF,EAEE,8DAFF,CAXJ,EAgBGmB,SAhBH,CAiBI,IAAInB,MAAJ,CACE,mBADF,EAEE,kEAFF,CAjBJ,EAsBGmB,SAtBH,CAuBI,IA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_.js","names":["spawn","spawnSync","ansiEscapeCodes","beforeAll","deleteJourneysCmd","status","console","error","stderr","toString","log","stdout","importBaselineJourneysCmd","cwd","importTestJourneysCmd","describe","it","done","journeyList","expected","join","chunks","on","chunk","push","output","Buffer","concat","expect","toBe","expectedLong","replace"],"sources":["cli/journey/journey-list.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 * delete all journeys and import baseline and additional test journeys\n */\nbeforeAll(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 baseline journeys\n const importBaselineJourneysCmd = spawnSync(\n 'frodo',\n ['journey', 'import', '--all-separate', 'frodo-dev'],\n {\n cwd: `test/e2e/journey/baseline`,\n }\n );\n if (importBaselineJourneysCmd.status > 0) {\n console.error(importBaselineJourneysCmd.stderr.toString());\n console.log(importBaselineJourneysCmd.stdout.toString());\n }\n\n // import additional test journeys\n const importTestJourneysCmd = spawnSync(\n 'frodo',\n ['journey', 'import', '--all-separate', 'frodo-dev'],\n {\n cwd: `test/e2e/journey/list`,\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 list', () => {\n it('\"frodo journey list\": should list the names of the default journeys', (done) => {\n const journeyList = spawn('frodo', ['journey', 'list', 'frodo-dev']);\n const expected = [\n 'Disabled',\n 'ForgottenUsername',\n 'Login',\n 'PasswordGrant',\n 'ProgressiveProfile',\n 'Registration',\n 'ResetPassword',\n 'UpdatePassword',\n '',\n ].join('\\n');\n\n const chunks = [];\n journeyList.stdout.on('data', (chunk) => {\n chunks.push(chunk);\n });\n\n journeyList.stdout.on('end', () => {\n const output = Buffer.concat(chunks).toString();\n try {\n expect(output).toBe(expected);\n done();\n } catch (error) {\n done(error);\n }\n });\n });\n\n const expectedLong = [\n 'Listing journeys in realm \"alpha\"...',\n 'Name │Status │Tags ',\n 'Disabled │disabled│Prototype ',\n 'ForgottenUsername │enabled │Username Reset ',\n 'Login │enabled │Authentication ',\n 'PasswordGrant │enabled │ ',\n 'ProgressiveProfile│enabled │Progressive Profile',\n 'Registration │enabled │Registration ',\n 'ResetPassword │enabled │Password Reset ',\n 'UpdatePassword │enabled │Password Reset ',\n '',\n ].join('\\n');\n\n it('\"frodo journey list -l\": should list the names, status, and tags of the default journeys', (done) => {\n const journeyList = spawn('frodo', ['journey', 'list', '-l', 'frodo-dev']);\n\n const chunks = [];\n journeyList.stdout.on('data', (chunk) => {\n chunks.push(chunk);\n });\n\n journeyList.stdout.on('end', () => {\n const output = Buffer.concat(chunks)\n .toString()\n .replace(ansiEscapeCodes, '');\n try {\n expect(output).toBe(expectedLong);\n done();\n } catch (error) {\n done(error);\n }\n });\n });\n\n it('\"frodo journey list --long\": should list the names, status, and tags of the default journeys', (done) => {\n const journeyList = spawn('frodo', [\n 'journey',\n 'list',\n '--long',\n 'frodo-dev',\n ]);\n\n const chunks = [];\n journeyList.stdout.on('data', (chunk) => {\n chunks.push(chunk);\n });\n\n journeyList.stdout.on('end', () => {\n const output = Buffer.concat(chunks)\n .toString()\n .replace(ansiEscapeCodes, '');\n try {\n expect(output).toBe(expectedLong);\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;EACpB;EACA,MAAMC,iBA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journey, state } from '@rockcarver/frodo-lib';
|
|
3
|
+
import * as common from '../cmd_common.js';
|
|
4
|
+
const {
|
|
5
|
+
getTokens
|
|
6
|
+
} = Authenticate;
|
|
7
|
+
const {
|
|
8
|
+
listJourneys
|
|
9
|
+
} = Journey;
|
|
10
|
+
const program = new Command('frodo journey list');
|
|
11
|
+
program.description('List journeys/trees.').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('-l, --long', 'Long with all fields.').default(false, 'false')).addOption(new Option('-a, --analyze', 'Analyze journeys for custom nodes.')).action( // implement command logic inside action handler
|
|
12
|
+
async (host, realm, user, password, options) => {
|
|
13
|
+
state.default.session.setTenant(host);
|
|
14
|
+
state.default.session.setRealm(realm);
|
|
15
|
+
state.default.session.setUsername(user);
|
|
16
|
+
state.default.session.setPassword(password);
|
|
17
|
+
state.default.session.setDeploymentType(options.type);
|
|
18
|
+
state.default.session.setAllowInsecureConnection(options.insecure);
|
|
19
|
+
|
|
20
|
+
if (await getTokens()) {
|
|
21
|
+
console.log(`Listing journeys in realm "${state.default.session.getRealm()}"...`);
|
|
22
|
+
listJourneys(options.long, options.analyze);
|
|
23
|
+
}
|
|
24
|
+
} // end command logic inside action handler
|
|
25
|
+
);
|
|
26
|
+
program.parse();
|
|
27
|
+
//# sourceMappingURL=journey-list.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"journey-list.js","names":["Command","Option","Authenticate","Journey","state","common","getTokens","listJourneys","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","console","log","getRealm","long","analyze","parse"],"sources":["cli/journey/journey-list.ts"],"sourcesContent":["import { Command, Option } from 'commander';\nimport { Authenticate, Journey, state } from '@rockcarver/frodo-lib';\nimport * as common from '../cmd_common.js';\n\nconst { getTokens } = Authenticate;\nconst { listJourneys } = Journey;\n\nconst program = new Command('frodo journey list');\n\nprogram\n .description('List journeys/trees.')\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 .addOption(new Option('-a, --analyze', 'Analyze journeys for custom nodes.'))\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 console.log(\n `Listing journeys in realm \"${state.default.session.getRealm()}\"...`\n );\n listJourneys(options.long, options.analyze);\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,OAAvB,EAAgCC,KAAhC,QAA6C,uBAA7C;AACA,OAAO,KAAKC,MAAZ,MAAwB,kBAAxB;AAEA,MAAM;EAAEC;AAAF,IAAgBJ,YAAtB;AACA,MAAM;EAAEK;AAAF,IAAmBJ,OAAzB;AAEA,MAAMK,OAAO,GAAG,IAAIR,OAAJ,CAAY,oBAAZ,CAAhB;AAEAQ,OAAO,CACJC,WADH,CACe,sBADf,EAEGC,UAFH,CAEc,YAFd,EAE4B,MAF5B,EAGGC,kBAHH,GAIGC,WAJH,CAIeP,MAAM,CAACQ,aAJtB,EAKGD,WALH,CAKeP,MAAM,CAACS,aALtB,EAMGF,WANH,CAMeP,MAAM,CAACU,YANtB,EAOGH,WAPH,CAOeP,MAAM,CAACW,gBAPtB,EAQGC,SARH,CAQaZ,MAAM,CAACa,gBARpB,EASGD,SATH,CASaZ,MAAM,CAACc,cATpB,EAUGF,SAVH,CAWI,IAAIhB,MAAJ,CAAW,YAAX,EAAyB,uBAAzB,EAAkDmB,OAAlD,CAA0D,KAA1D,EAAiE,OAAjE,CAXJ,EAaGH,SAbH,CAaa,IAAIhB,MAAJ,CAAW,eAAX,EAA4B,oCAA5B,CAbb,EAcGoB,MAdH,EAeI;AACA,OAAOC,IAAP,EAAaC,KAAb,EAAoBC,IAApB,EAA0BC,QAA1B,EAAoCC,OAApC,KAAgD;EAC9CtB,KAAK,CAACgB,OAAN,CAAcO,OAAd,CAAsBC,SAAtB,CAAgCN,IAAhC;EACAlB,KAAK,CAACgB,OAAN,CAAcO,OAAd,CAAsBE,QAAtB,CAA+BN,KAA/B;EACAnB,KAAK,CAACgB,OAAN,CAAcO,OAAd,CAAsBG,WAAtB,CAAkCN,IAAlC;EACApB,KAAK,CAACgB,OAAN,CAAcO,OAAd,CAAsBI,WAAtB,CAAkCN,QAAlC;EACArB,KAAK,CAACgB,OAAN,CAAcO,OAAd,CAAsBK,iBAAtB,CAAwCN,OAAO,CAACO,IAAhD;EACA7B,KAAK,CAACgB,OAAN,CAAcO,OAAd,CAAsBO,0BAAtB,CAAiDR,OAAO,CAACS,QAAzD;;EACA,IAAI,MAAM7B,SAAS,EAAnB,EAAuB;IACrB8B,OAAO,CAACC,GAAR,CACG,8BAA6BjC,KAAK,CAACgB,OAAN,CAAcO,OAAd,CAAsBW,QAAtB,EAAiC,MADjE;IAGA/B,YAAY,CAACmB,OAAO,CAACa,IAAT,EAAeb,OAAO,CAACc,OAAvB,CAAZ;EACD;AACF,CA7BL,CA8BI;AA9BJ;AAiCAhC,OAAO,CAACiC,KAAR"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { Command } from 'commander';
|
|
2
|
+
import { Authenticate, Journey, state } from '@rockcarver/frodo-lib';
|
|
3
|
+
import yesno from 'yesno';
|
|
4
|
+
import * as common from '../cmd_common.js';
|
|
5
|
+
const {
|
|
6
|
+
getTokens
|
|
7
|
+
} = Authenticate;
|
|
8
|
+
const {
|
|
9
|
+
findOrphanedNodes,
|
|
10
|
+
removeOrphanedNodes
|
|
11
|
+
} = Journey;
|
|
12
|
+
const program = new Command('frodo journey prune');
|
|
13
|
+
program.description('Prune orphaned configuration artifacts left behind after deleting authentication trees. You will be prompted before any destructive operations are performed.').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
|
|
14
|
+
async (host, realm, user, password, options) => {
|
|
15
|
+
state.default.session.setTenant(host);
|
|
16
|
+
state.default.session.setRealm(realm);
|
|
17
|
+
state.default.session.setUsername(user);
|
|
18
|
+
state.default.session.setPassword(password);
|
|
19
|
+
state.default.session.setDeploymentType(options.type);
|
|
20
|
+
state.default.session.setAllowInsecureConnection(options.insecure);
|
|
21
|
+
|
|
22
|
+
if (await getTokens()) {
|
|
23
|
+
console.log(`Pruning orphaned configuration artifacts in realm "${state.default.session.getRealm()}"...`);
|
|
24
|
+
const orphanedNodes = await findOrphanedNodes();
|
|
25
|
+
|
|
26
|
+
if (orphanedNodes.length > 0) {
|
|
27
|
+
const ok = await yesno({
|
|
28
|
+
question: 'Prune (permanently delete) orphaned nodes? (y|n):'
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
if (ok) {
|
|
32
|
+
await removeOrphanedNodes(orphanedNodes);
|
|
33
|
+
}
|
|
34
|
+
} else {
|
|
35
|
+
console.log('No orphaned nodes found.');
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
} // end command logic inside action handler
|
|
39
|
+
);
|
|
40
|
+
program.parse();
|
|
41
|
+
//# sourceMappingURL=journey-prune.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"journey-prune.js","names":["Command","Authenticate","Journey","state","yesno","common","getTokens","findOrphanedNodes","removeOrphanedNodes","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","console","log","getRealm","orphanedNodes","length","ok","question","parse"],"sources":["cli/journey/journey-prune.ts"],"sourcesContent":["import { Command } from 'commander';\nimport { Authenticate, Journey, state } from '@rockcarver/frodo-lib';\nimport yesno from 'yesno';\nimport * as common from '../cmd_common.js';\n\nconst { getTokens } = Authenticate;\nconst { findOrphanedNodes, removeOrphanedNodes } = Journey;\n\nconst program = new Command('frodo journey prune');\n\nprogram\n .description(\n 'Prune orphaned configuration artifacts left behind after deleting authentication trees. You will be prompted before any destructive operations are performed.'\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 console.log(\n `Pruning orphaned configuration artifacts in realm \"${state.default.session.getRealm()}\"...`\n );\n const orphanedNodes = await findOrphanedNodes();\n if (orphanedNodes.length > 0) {\n const ok = await yesno({\n question: 'Prune (permanently delete) orphaned nodes? (y|n):',\n });\n if (ok) {\n await removeOrphanedNodes(orphanedNodes);\n }\n } else {\n console.log('No orphaned nodes found.');\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,OAAvB,EA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,OAAN,CAAcC,OAAd,CAAsBW,QAAtB,EAAiC,MADzF;IAGA,MAAMC,aAAa,GAAG,MAAMjC,iBAAiB,EAA7C;;IACA,IAAIiC,aAAa,CAACC,MAAd,GAAuB,CAA3B,EAA8B;MAC5B,MAAMC,EAAE,GAAG,MAAMtC,KAAK,CAAC;QACrBuC,QAAQ,EAAE;MADW,CAAD,CAAtB;;MAGA,IAAID,EAAJ,EAAQ;QACN,MAAMlC,mBAAmB,CAACgC,aAAD,CAAzB;MACD;IACF,CAPD,MAOO;MACLH,OAAO,CAACC,GAAR,CAAY,0BAAZ;IACD;EACF;AACF,CArCL,CAsCI;AAtCJ;AAyCA7B,OAAO,CAACmC,KAAR"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Command } from 'commander';
|
|
2
|
+
import path from 'path';
|
|
3
|
+
import { fileURLToPath } from 'url';
|
|
4
|
+
|
|
5
|
+
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
6
|
+
|
|
7
|
+
export default function setup() {
|
|
8
|
+
const program = new Command('journey').helpOption('-h, --help', 'Help').description('Manage journeys/trees.').executableDir(__dirname);
|
|
9
|
+
program.command('list', 'List journeys/trees.').showHelpAfterError();
|
|
10
|
+
program.command('describe', 'If host argument is supplied, describe the journey/tree indicated by -t, or all journeys/trees in the realm if no -t is supplied, otherwise describe the journey/tree export file indicated by -f.').showHelpAfterError();
|
|
11
|
+
program.command('export', 'Export journeys/trees.').showHelpAfterError();
|
|
12
|
+
program.command('import', 'Import journeys/trees.').showHelpAfterError();
|
|
13
|
+
program.command('delete', 'Delete journeys/trees.').showHelpAfterError();
|
|
14
|
+
program.command('prune', 'Prune orphaned configuration artifacts left behind after deleting authentication trees. You will be prompted before any destructive operations are performed.').showHelpAfterError();
|
|
15
|
+
program.command('enable', 'Enable journeys/trees.').showHelpAfterError();
|
|
16
|
+
program.command('disable', 'Disable journeys/trees.').showHelpAfterError();
|
|
17
|
+
program.showHelpAfterError();
|
|
18
|
+
return program;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=journey.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"journey.js","names":["Command","path","fileURLToPath","__dirname","dirname","import","meta","url","setup","program","helpOption","description","executableDir","command","showHelpAfterError"],"sources":["cli/journey/journey.ts"],"sourcesContent":["import { Command } from 'commander';\nimport path from 'path';\nimport { fileURLToPath } from 'url';\n\nconst __dirname = path.dirname(fileURLToPath(import.meta.url));\n\nexport default function setup() {\n const program = new Command('journey')\n .helpOption('-h, --help', 'Help')\n .description('Manage journeys/trees.')\n .executableDir(__dirname);\n\n program.command('list', 'List journeys/trees.').showHelpAfterError();\n\n program\n .command(\n 'describe',\n 'If host argument is supplied, describe the journey/tree indicated by -t, or all journeys/trees in the realm if no -t is supplied, otherwise describe the journey/tree export file indicated by -f.'\n )\n .showHelpAfterError();\n\n program.command('export', 'Export journeys/trees.').showHelpAfterError();\n\n program.command('import', 'Import journeys/trees.').showHelpAfterError();\n\n program.command('delete', 'Delete journeys/trees.').showHelpAfterError();\n\n program\n .command(\n 'prune',\n 'Prune orphaned configuration artifacts left behind after deleting authentication trees. You will be prompted before any destructive operations are performed.'\n )\n .showHelpAfterError();\n\n program.command('enable', 'Enable journeys/trees.').showHelpAfterError();\n \n program.command('disable', 'Disable journeys/trees.').showHelpAfterError();\n\n program.showHelpAfterError();\n return program;\n}\n"],"mappings":"AAAA,SAASA,OAAT,QAAwB,WAAxB;AACA,OAAOC,IAAP,MAAiB,MAAjB;AACA,SAASC,aAAT,QAA8B,KAA9B;;AAEA,MAAMC,SAAS,GAAGF,IAAI,CAACG,OAAL,CAAaF,aAAa,CAACG,MAAM,CAACC,IAAP,CAAYC,GAAb,CAA1B,CAAlB;;AAEA,eAAe,SAASC,KAAT,GAAiB;EAC9B,MAAMC,OAAO,GAAG,IAAIT,OAAJ,CAAY,SAAZ,EACbU,UADa,CACF,YADE,EACY,MADZ,EAEbC,WAFa,CAED,wBAFC,EAGbC,aAHa,CAGCT,SAHD,CAAhB;EAKAM,OAAO,CAACI,OAAR,CAAgB,MAAhB,EAAwB,sBAAxB,EAAgDC,kBAAhD;EAEAL,OAAO,CACJI,OADH,CAEI,UAFJ,EAGI,oMAHJ,EAKGC,kBALH;EAOAL,OAAO,CAACI,OAAR,CAAgB,QAAhB,EAA0B,wBAA1B,EAAoDC,kBAApD;EAEAL,OAAO,CAACI,OAAR,CAAgB,QAAhB,EAA0B,wBAA1B,EAAoDC,kBAApD;EAEAL,OAAO,CAACI,OAAR,CAAgB,QAAhB,EAA0B,wBAA1B,EAAoDC,kBAApD;EAEAL,OAAO,CACJI,OADH,CAEI,OAFJ,EAGI,+JAHJ,EAKGC,kBALH;EAOEL,OAAO,CAACI,OAAR,CAAgB,QAAhB,EAA0B,wBAA1B,EAAoDC,kBAApD;EAEAL,OAAO,CAACI,OAAR,CAAgB,SAAhB,EAA2B,yBAA3B,EAAsDC,kBAAtD;EAEFL,OAAO,CAACK,kBAAR;EACA,OAAOL,OAAP;AACD"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { Authenticate, ConnectionProfile, Log, state } from '@rockcarver/frodo-lib';
|
|
2
|
+
import { Command } from 'commander';
|
|
3
|
+
import * as common from '../cmd_common.js';
|
|
4
|
+
const {
|
|
5
|
+
provisionCreds,
|
|
6
|
+
getLogSources
|
|
7
|
+
} = Log;
|
|
8
|
+
const {
|
|
9
|
+
getConnectionProfile,
|
|
10
|
+
saveConnectionProfile
|
|
11
|
+
} = ConnectionProfile;
|
|
12
|
+
const {
|
|
13
|
+
getTokens
|
|
14
|
+
} = Authenticate;
|
|
15
|
+
const program = new Command('frodo logs list');
|
|
16
|
+
program.description('List available ID Cloud log sources.').helpOption('-h, --help', 'Help').addArgument(common.hostArgumentM).addArgument(common.userArgument).addArgument(common.passwordArgument).addOption(common.insecureOption).action(async (host, user, password, options) => {
|
|
17
|
+
let credsFromParameters = true;
|
|
18
|
+
state.default.session.setTenant(host);
|
|
19
|
+
state.default.session.setUsername(user);
|
|
20
|
+
state.default.session.setPassword(password);
|
|
21
|
+
state.default.session.setAllowInsecureConnection(options.insecure);
|
|
22
|
+
console.log('Listing available ID Cloud log sources...');
|
|
23
|
+
const conn = await getConnectionProfile();
|
|
24
|
+
state.default.session.setTenant(conn.tenant);
|
|
25
|
+
|
|
26
|
+
if (conn.key != null && conn.secret != null) {
|
|
27
|
+
credsFromParameters = false;
|
|
28
|
+
state.default.session.setLogApiKey(conn.key);
|
|
29
|
+
state.default.session.setLogApiSecret(conn.secret);
|
|
30
|
+
} else {
|
|
31
|
+
if (conn.username == null && conn.password == null) {
|
|
32
|
+
if (!state.default.session.getUsername() && !state.default.session.getPassword()) {
|
|
33
|
+
credsFromParameters = false;
|
|
34
|
+
console.log('User credentials not specified as parameters and no saved API key and secret found!', 'warn');
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
} else {
|
|
38
|
+
state.default.session.setUsername(conn.username);
|
|
39
|
+
state.default.session.setPassword(conn.password);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
if (await getTokens()) {
|
|
43
|
+
const creds = await provisionCreds();
|
|
44
|
+
state.default.session.setLogApiKey(creds.api_key_id);
|
|
45
|
+
state.default.session.setLogApiSecret(creds.api_key_secret);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
const sources = await getLogSources();
|
|
50
|
+
|
|
51
|
+
if (sources.length === 0) {
|
|
52
|
+
console.log("Can't get sources, possible cause - wrong API key or secret", 'error');
|
|
53
|
+
} else {
|
|
54
|
+
if (credsFromParameters) await saveConnectionProfile(); // save new values if they were specified on CLI
|
|
55
|
+
|
|
56
|
+
console.log('Available log sources:');
|
|
57
|
+
sources.forEach(source => {
|
|
58
|
+
console.log(`${source}`, 'info');
|
|
59
|
+
});
|
|
60
|
+
console.log('You can use any combination of comma separated sources.');
|
|
61
|
+
console.log('For example:');
|
|
62
|
+
console.log(`$ frodo logs tail -c am-core,idm-core ${host}`, 'info');
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
program.parse();
|
|
66
|
+
//# sourceMappingURL=logs-list.js.map
|