@rockcarver/frodo-cli 0.13.3 → 0.14.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 +29 -1
- package/package.json +14 -7
- package/src/app.js +0 -63
- package/src/cli/_template/cmd-delete.js +0 -56
- package/src/cli/_template/cmd-describe.js +0 -36
- package/src/cli/_template/cmd-export.js +0 -54
- package/src/cli/_template/cmd-import.js +0 -54
- package/src/cli/_template/cmd-list.js +0 -38
- package/src/cli/_template/cmd-sub1-delete.js +0 -56
- package/src/cli/_template/cmd-sub1-describe.js +0 -36
- package/src/cli/_template/cmd-sub1-export.js +0 -54
- package/src/cli/_template/cmd-sub1-import.js +0 -54
- package/src/cli/_template/cmd-sub1-list.js +0 -38
- package/src/cli/_template/cmd-sub1.js +0 -20
- package/src/cli/_template/cmd-sub2-delete.js +0 -56
- package/src/cli/_template/cmd-sub2-describe.js +0 -36
- package/src/cli/_template/cmd-sub2-export.js +0 -54
- package/src/cli/_template/cmd-sub2-import.js +0 -54
- package/src/cli/_template/cmd-sub2-list.js +0 -38
- package/src/cli/_template/cmd-sub2.js +0 -20
- package/src/cli/_template/cmd.js +0 -29
- package/src/cli/admin/admin-add-autoid-static-user-mapping.js +0 -40
- package/src/cli/admin/admin-create-oauth2-client-with-admin-privileges.js +0 -121
- package/src/cli/admin/admin-get-access-token.js +0 -59
- package/src/cli/admin/admin-grant-oauth2-client-admin-privileges.js +0 -45
- package/src/cli/admin/admin-hide-generic-extension-attributes.js +0 -47
- package/src/cli/admin/admin-list-oauth2-clients-with-admin-privileges.js +0 -45
- package/src/cli/admin/admin-list-oauth2-clients-with-custom-privileges.js +0 -46
- package/src/cli/admin/admin-list-static-user-mappings.js +0 -53
- package/src/cli/admin/admin-remove-static-user-mapping.js +0 -38
- package/src/cli/admin/admin-repair-org-model.js +0 -47
- package/src/cli/admin/admin-revoke-oauth2-client-admin-privileges.js +0 -47
- package/src/cli/admin/admin-show-generic-extension-attributes.js +0 -55
- package/src/cli/admin/admin.js +0 -94
- package/src/cli/app/app-delete.js +0 -56
- package/src/cli/app/app-describe.js +0 -36
- package/src/cli/app/app-export.js +0 -78
- package/src/cli/app/app-import.js +0 -56
- package/src/cli/app/app-list.js +0 -40
- package/src/cli/app/app.js +0 -29
- package/src/cli/cmd_common.js +0 -181
- package/src/cli/conn/conn-add.js +0 -65
- package/src/cli/conn/conn-delete.js +0 -22
- package/src/cli/conn/conn-describe.js +0 -23
- package/src/cli/conn/conn-list.js +0 -27
- package/src/cli/conn/conn.js +0 -28
- package/src/cli/email/email-template-export.js +0 -90
- package/src/cli/email/email-template-import.js +0 -90
- package/src/cli/email/email-template-list.js +0 -40
- package/src/cli/email/email-template.js +0 -16
- package/src/cli/email/email.js +0 -17
- package/src/cli/esv/esv-apply.js +0 -120
- package/src/cli/esv/esv-secret-create.js +0 -64
- package/src/cli/esv/esv-secret-delete.js +0 -65
- package/src/cli/esv/esv-secret-describe.js +0 -43
- package/src/cli/esv/esv-secret-export.js +0 -54
- package/src/cli/esv/esv-secret-import.js +0 -54
- package/src/cli/esv/esv-secret-list.js +0 -40
- package/src/cli/esv/esv-secret-set.js +0 -45
- package/src/cli/esv/esv-secret-version-activate.js +0 -53
- package/src/cli/esv/esv-secret-version-create.js +0 -45
- package/src/cli/esv/esv-secret-version-deactivate.js +0 -53
- package/src/cli/esv/esv-secret-version-delete.js +0 -66
- package/src/cli/esv/esv-secret-version-list.js +0 -41
- package/src/cli/esv/esv-secret-version.js +0 -20
- package/src/cli/esv/esv-secret.js +0 -26
- package/src/cli/esv/esv-variable-create.js +0 -46
- package/src/cli/esv/esv-variable-delete.js +0 -71
- package/src/cli/esv/esv-variable-describe.js +0 -43
- package/src/cli/esv/esv-variable-export.js +0 -54
- package/src/cli/esv/esv-variable-import.js +0 -54
- package/src/cli/esv/esv-variable-list.js +0 -40
- package/src/cli/esv/esv-variable-set.js +0 -62
- package/src/cli/esv/esv-variable.js +0 -24
- package/src/cli/esv/esv.js +0 -21
- package/src/cli/idm/idm-count.js +0 -42
- package/src/cli/idm/idm-export.js +0 -116
- package/src/cli/idm/idm-list.js +0 -40
- package/src/cli/idm/idm.js +0 -28
- package/src/cli/idp/idp-export.js +0 -90
- package/src/cli/idp/idp-import.js +0 -101
- package/src/cli/idp/idp-list.js +0 -42
- package/src/cli/idp/idp.js +0 -21
- package/src/cli/info/info.js +0 -55
- package/src/cli/journey/journey-delete.js +0 -78
- package/src/cli/journey/journey-describe.js +0 -143
- package/src/cli/journey/journey-export.js +0 -110
- package/src/cli/journey/journey-import.js +0 -127
- package/src/cli/journey/journey-list.js +0 -43
- package/src/cli/journey/journey-prune.js +0 -52
- package/src/cli/journey/journey.js +0 -37
- package/src/cli/logging/logs-list.js +0 -77
- package/src/cli/logging/logs-tail.js +0 -85
- package/src/cli/logging/logs.js +0 -21
- package/src/cli/realm/realm-add-custom-domain.js +0 -47
- package/src/cli/realm/realm-describe.js +0 -40
- package/src/cli/realm/realm-list.js +0 -40
- package/src/cli/realm/realm-remove-custom-domain.js +0 -50
- package/src/cli/realm/realm.js +0 -33
- package/src/cli/saml/saml-cot-export.js +0 -90
- package/src/cli/saml/saml-cot-import.js +0 -101
- package/src/cli/saml/saml-cot-list.js +0 -42
- package/src/cli/saml/saml-cot.js +0 -16
- package/src/cli/saml/saml-describe.js +0 -42
- package/src/cli/saml/saml-export.js +0 -91
- package/src/cli/saml/saml-import.js +0 -102
- package/src/cli/saml/saml-list.js +0 -42
- package/src/cli/saml/saml-metadata-export.js +0 -76
- package/src/cli/saml/saml-metadata.js +0 -12
- package/src/cli/saml/saml.js +0 -29
- package/src/cli/script/script-delete.js +0 -56
- package/src/cli/script/script-describe.js +0 -36
- package/src/cli/script/script-export.js +0 -95
- package/src/cli/script/script-import.js +0 -64
- package/src/cli/script/script-list.js +0 -42
- package/src/cli/script/script.js +0 -25
- package/src/cli/theme/theme-delete.js +0 -83
- package/src/cli/theme/theme-export.js +0 -107
- package/src/cli/theme/theme-import.js +0 -118
- package/src/cli/theme/theme-list.js +0 -42
- package/src/cli/theme/theme.js +0 -23
- package/src/storage/StaticStorage.js +0 -15
- package/src/utils/Console.js +0 -482
- package/tsconfig.json +0 -106
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
import { Command, Option } from 'commander';
|
|
2
|
-
import { Authenticate, Theme, state } from '@rockcarver/frodo-lib';
|
|
3
|
-
import * as common from '../cmd_common.js';
|
|
4
|
-
|
|
5
|
-
const { getTokens } = Authenticate;
|
|
6
|
-
|
|
7
|
-
const {
|
|
8
|
-
exportThemeById,
|
|
9
|
-
exportThemeByName,
|
|
10
|
-
exportThemesToFile,
|
|
11
|
-
exportThemesToFiles,
|
|
12
|
-
} = Theme;
|
|
13
|
-
|
|
14
|
-
const program = new Command('frodo theme export');
|
|
15
|
-
|
|
16
|
-
program
|
|
17
|
-
.description('Export themes.')
|
|
18
|
-
.helpOption('-h, --help', 'Help')
|
|
19
|
-
.showHelpAfterError()
|
|
20
|
-
.addArgument(common.hostArgumentM)
|
|
21
|
-
.addArgument(common.realmArgument)
|
|
22
|
-
.addArgument(common.userArgument)
|
|
23
|
-
.addArgument(common.passwordArgument)
|
|
24
|
-
.addOption(common.deploymentOption)
|
|
25
|
-
.addOption(common.insecureOption)
|
|
26
|
-
.addOption(
|
|
27
|
-
new Option(
|
|
28
|
-
'-n, --theme-name <name>',
|
|
29
|
-
'Name of the theme. If specified, -a and -A are ignored.'
|
|
30
|
-
)
|
|
31
|
-
)
|
|
32
|
-
.addOption(
|
|
33
|
-
new Option(
|
|
34
|
-
'-i, --theme-id <uuid>',
|
|
35
|
-
'Uuid of the theme. If specified, -a and -A are ignored.'
|
|
36
|
-
)
|
|
37
|
-
)
|
|
38
|
-
.addOption(
|
|
39
|
-
new Option(
|
|
40
|
-
'-f, --file [file]',
|
|
41
|
-
'Name of the file to write the exported theme(s) to. Ignored with -A.'
|
|
42
|
-
)
|
|
43
|
-
)
|
|
44
|
-
.addOption(
|
|
45
|
-
new Option(
|
|
46
|
-
'-a, --all',
|
|
47
|
-
'Export all the themes in a realm to a single file. Ignored with -n and -i.'
|
|
48
|
-
)
|
|
49
|
-
)
|
|
50
|
-
.addOption(
|
|
51
|
-
new Option(
|
|
52
|
-
'-A, --all-separate',
|
|
53
|
-
'Export all the themes in a realm as separate files <theme name>.theme.json. Ignored with -n, -i, and -a.'
|
|
54
|
-
)
|
|
55
|
-
)
|
|
56
|
-
.action(
|
|
57
|
-
// implement command logic inside action handler
|
|
58
|
-
async (host, realm, user, password, options) => {
|
|
59
|
-
state.default.session.setTenant(host);
|
|
60
|
-
state.default.session.setRealm(realm);
|
|
61
|
-
state.default.session.setUsername(user);
|
|
62
|
-
state.default.session.setPassword(password);
|
|
63
|
-
state.default.session.setDeploymentType(options.type);
|
|
64
|
-
state.default.session.setAllowInsecureConnection(options.insecure);
|
|
65
|
-
if (await getTokens()) {
|
|
66
|
-
// export by name
|
|
67
|
-
if (options.themeName) {
|
|
68
|
-
console.log(
|
|
69
|
-
`Exporting theme "${
|
|
70
|
-
options.themeName
|
|
71
|
-
}" from realm "${state.default.session.getRealm()}"...`
|
|
72
|
-
);
|
|
73
|
-
exportThemeByName(options.themeName, options.file);
|
|
74
|
-
}
|
|
75
|
-
// export by id
|
|
76
|
-
else if (options.themeId) {
|
|
77
|
-
console.log(
|
|
78
|
-
`Exporting theme "${
|
|
79
|
-
options.themeId
|
|
80
|
-
}" from realm "${state.default.session.getRealm()}"...`
|
|
81
|
-
);
|
|
82
|
-
exportThemeById(options.themeId, options.file);
|
|
83
|
-
}
|
|
84
|
-
// --all -a
|
|
85
|
-
else if (options.all) {
|
|
86
|
-
console.log('Exporting all themes to a single file...');
|
|
87
|
-
exportThemesToFile(options.file);
|
|
88
|
-
}
|
|
89
|
-
// --all-separate -A
|
|
90
|
-
else if (options.allSeparate) {
|
|
91
|
-
console.log('Exporting all themes to separate files...');
|
|
92
|
-
exportThemesToFiles();
|
|
93
|
-
}
|
|
94
|
-
// unrecognized combination of options or no options
|
|
95
|
-
else {
|
|
96
|
-
console.log(
|
|
97
|
-
'Unrecognized combination of options or no options...',
|
|
98
|
-
'error'
|
|
99
|
-
);
|
|
100
|
-
program.help();
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
// end command logic inside action handler
|
|
105
|
-
);
|
|
106
|
-
|
|
107
|
-
program.parse();
|
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
import { Command, Option } from 'commander';
|
|
2
|
-
import { Authenticate, Theme, state } from '@rockcarver/frodo-lib';
|
|
3
|
-
import * as common from '../cmd_common.js';
|
|
4
|
-
|
|
5
|
-
const { getTokens } = Authenticate;
|
|
6
|
-
|
|
7
|
-
const {
|
|
8
|
-
importFirstThemeFromFile,
|
|
9
|
-
importThemeById,
|
|
10
|
-
importThemeByName,
|
|
11
|
-
importThemesFromFile,
|
|
12
|
-
importThemesFromFiles,
|
|
13
|
-
} = Theme;
|
|
14
|
-
|
|
15
|
-
const program = new Command('frodo theme import');
|
|
16
|
-
|
|
17
|
-
program
|
|
18
|
-
.description('Import themes.')
|
|
19
|
-
.helpOption('-h, --help', 'Help')
|
|
20
|
-
.showHelpAfterError()
|
|
21
|
-
.addArgument(common.hostArgumentM)
|
|
22
|
-
.addArgument(common.realmArgument)
|
|
23
|
-
.addArgument(common.userArgument)
|
|
24
|
-
.addArgument(common.passwordArgument)
|
|
25
|
-
.addOption(common.deploymentOption)
|
|
26
|
-
.addOption(common.insecureOption)
|
|
27
|
-
.addOption(
|
|
28
|
-
new Option(
|
|
29
|
-
'-n, --theme-name <name>',
|
|
30
|
-
'Name of the theme. If specified, -a and -A are ignored.'
|
|
31
|
-
)
|
|
32
|
-
)
|
|
33
|
-
.addOption(
|
|
34
|
-
new Option(
|
|
35
|
-
'-i, --theme-id <uuid>',
|
|
36
|
-
'Uuid of the theme. If specified, -a and -A are ignored.'
|
|
37
|
-
)
|
|
38
|
-
)
|
|
39
|
-
.addOption(
|
|
40
|
-
new Option(
|
|
41
|
-
'-f, --file <file>',
|
|
42
|
-
'Name of the file to import the theme(s) from.'
|
|
43
|
-
)
|
|
44
|
-
)
|
|
45
|
-
.addOption(
|
|
46
|
-
new Option(
|
|
47
|
-
'-a, --all',
|
|
48
|
-
'Import all the themes from single file. Ignored with -n or -i.'
|
|
49
|
-
)
|
|
50
|
-
)
|
|
51
|
-
.addOption(
|
|
52
|
-
new Option(
|
|
53
|
-
'-A, --all-separate',
|
|
54
|
-
'Import all the themes from separate files (*.json) in the current directory. Ignored with -n or -i or -a.'
|
|
55
|
-
)
|
|
56
|
-
)
|
|
57
|
-
.action(
|
|
58
|
-
// implement command logic inside action handler
|
|
59
|
-
async (host, realm, user, password, options) => {
|
|
60
|
-
state.default.session.setTenant(host);
|
|
61
|
-
state.default.session.setRealm(realm);
|
|
62
|
-
state.default.session.setUsername(user);
|
|
63
|
-
state.default.session.setPassword(password);
|
|
64
|
-
state.default.session.setDeploymentType(options.type);
|
|
65
|
-
state.default.session.setAllowInsecureConnection(options.insecure);
|
|
66
|
-
if (await getTokens()) {
|
|
67
|
-
// import by name
|
|
68
|
-
if (options.file && options.themeName) {
|
|
69
|
-
console.log(
|
|
70
|
-
`Importing theme with name "${
|
|
71
|
-
options.themeName
|
|
72
|
-
}" into realm "${state.default.session.getRealm()}"...`
|
|
73
|
-
);
|
|
74
|
-
importThemeByName(options.themeName, options.file);
|
|
75
|
-
}
|
|
76
|
-
// import by id
|
|
77
|
-
else if (options.file && options.themeId) {
|
|
78
|
-
console.log(
|
|
79
|
-
`Importing theme with id "${
|
|
80
|
-
options.themeId
|
|
81
|
-
}" into realm "${state.default.session.getRealm()}"...`
|
|
82
|
-
);
|
|
83
|
-
importThemeById(options.themeId, options.file);
|
|
84
|
-
}
|
|
85
|
-
// --all -a
|
|
86
|
-
else if (options.all && options.file) {
|
|
87
|
-
console.log(
|
|
88
|
-
`Importing all themes from a single file (${options.file})...`
|
|
89
|
-
);
|
|
90
|
-
importThemesFromFile(options.file);
|
|
91
|
-
}
|
|
92
|
-
// --all-separate -A
|
|
93
|
-
else if (options.allSeparate && !options.file) {
|
|
94
|
-
console.log(
|
|
95
|
-
'Importing all themes from separate files in current directory...'
|
|
96
|
-
);
|
|
97
|
-
importThemesFromFiles();
|
|
98
|
-
}
|
|
99
|
-
// import single theme from file
|
|
100
|
-
else if (options.file) {
|
|
101
|
-
console.log(
|
|
102
|
-
`Importing first theme from file "${
|
|
103
|
-
options.file
|
|
104
|
-
}" into realm "${state.default.session.getRealm()}"...`
|
|
105
|
-
);
|
|
106
|
-
importFirstThemeFromFile(options.file);
|
|
107
|
-
}
|
|
108
|
-
// unrecognized combination of options or no options
|
|
109
|
-
else {
|
|
110
|
-
console.log('Unrecognized combination of options or no options...');
|
|
111
|
-
program.help();
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
// end command logic inside action handler
|
|
116
|
-
);
|
|
117
|
-
|
|
118
|
-
program.parse();
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { Command, Option } from 'commander';
|
|
2
|
-
import { Authenticate, Theme, state } from '@rockcarver/frodo-lib';
|
|
3
|
-
import * as common from '../cmd_common.js';
|
|
4
|
-
|
|
5
|
-
const { getTokens } = Authenticate;
|
|
6
|
-
const { listThemes } = Theme;
|
|
7
|
-
|
|
8
|
-
const program = new Command('frodo theme list');
|
|
9
|
-
|
|
10
|
-
program
|
|
11
|
-
.description('List themes.')
|
|
12
|
-
.helpOption('-h, --help', 'Help')
|
|
13
|
-
.showHelpAfterError()
|
|
14
|
-
.addArgument(common.hostArgumentM)
|
|
15
|
-
.addArgument(common.realmArgument)
|
|
16
|
-
.addArgument(common.userArgument)
|
|
17
|
-
.addArgument(common.passwordArgument)
|
|
18
|
-
.addOption(common.deploymentOption)
|
|
19
|
-
.addOption(common.insecureOption)
|
|
20
|
-
.addOption(
|
|
21
|
-
new Option('-l, --long', 'Long with more fields.').default(false, 'false')
|
|
22
|
-
)
|
|
23
|
-
.action(
|
|
24
|
-
// implement command logic inside action handler
|
|
25
|
-
async (host, realm, user, password, options) => {
|
|
26
|
-
state.default.session.setTenant(host);
|
|
27
|
-
state.default.session.setRealm(realm);
|
|
28
|
-
state.default.session.setUsername(user);
|
|
29
|
-
state.default.session.setPassword(password);
|
|
30
|
-
state.default.session.setDeploymentType(options.type);
|
|
31
|
-
state.default.session.setAllowInsecureConnection(options.insecure);
|
|
32
|
-
if (await getTokens()) {
|
|
33
|
-
console.log(
|
|
34
|
-
`Listing themes in realm "${state.default.session.getRealm()}"...`
|
|
35
|
-
);
|
|
36
|
-
listThemes(options.long);
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
// end command logic inside action handler
|
|
40
|
-
);
|
|
41
|
-
|
|
42
|
-
program.parse();
|
package/src/cli/theme/theme.js
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
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('theme')
|
|
9
|
-
.helpOption('-h, --help', 'Help')
|
|
10
|
-
.description('Manage themes.')
|
|
11
|
-
.executableDir(__dirname);
|
|
12
|
-
|
|
13
|
-
program.command('list', 'List themes.').showHelpAfterError();
|
|
14
|
-
|
|
15
|
-
program.command('export', 'Export themes.').showHelpAfterError();
|
|
16
|
-
|
|
17
|
-
program.command('import', 'Import themes.').showHelpAfterError();
|
|
18
|
-
|
|
19
|
-
program.command('delete', 'Delete themes.').showHelpAfterError();
|
|
20
|
-
|
|
21
|
-
program.showHelpAfterError();
|
|
22
|
-
return program;
|
|
23
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export const DEFAULT_REALM_KEY = '__default__realm__';
|
|
2
|
-
export const CLASSIC_DEPLOYMENT_TYPE_KEY = 'classic';
|
|
3
|
-
export const CLOUD_DEPLOYMENT_TYPE_KEY = 'cloud';
|
|
4
|
-
export const FORGEOPS_DEPLOYMENT_TYPE_KEY = 'forgeops';
|
|
5
|
-
export const DEPLOYMENT_TYPES = [
|
|
6
|
-
CLASSIC_DEPLOYMENT_TYPE_KEY,
|
|
7
|
-
CLOUD_DEPLOYMENT_TYPE_KEY,
|
|
8
|
-
FORGEOPS_DEPLOYMENT_TYPE_KEY,
|
|
9
|
-
];
|
|
10
|
-
export const DEPLOYMENT_TYPE_REALM_MAP = {
|
|
11
|
-
[CLASSIC_DEPLOYMENT_TYPE_KEY]: '/',
|
|
12
|
-
[CLOUD_DEPLOYMENT_TYPE_KEY]: 'alpha',
|
|
13
|
-
[FORGEOPS_DEPLOYMENT_TYPE_KEY]: '/',
|
|
14
|
-
};
|
|
15
|
-
export const FRODO_METADATA_ID = 'frodo';
|