Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
84 changes: 71 additions & 13 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@rockcarver/frodo-cli",
"version": "2.1.0",
"version": "2.2.0",
"type": "module",
"description": "A command line interface to manage ForgeRock Identity Cloud tenants, ForgeOps deployments, and classic deployments.",
"keywords": [
Expand Down Expand Up @@ -114,7 +114,7 @@
]
},
"devDependencies": {
"@rockcarver/frodo-lib": "2.2.0",
"@rockcarver/frodo-lib": "2.4.0",
"@types/colors": "^1.2.1",
"@types/fs-extra": "^11.0.1",
"@types/jest": "^29.2.3",
Expand Down Expand Up @@ -158,5 +158,8 @@
"typescript": "^5.2.2",
"uuid": "^9.0.0",
"yesno": "^0.4.0"
},
"dependencies": {
"iconv-lite": "^0.4.24"
}
}
11 changes: 11 additions & 0 deletions src/cli/FrodoCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,14 @@ const noCacheOption = new Option(
'Disable token cache for this operation.'
);

const useRealmPrefixOnManagedObjects = new Option(
'--use-realm-prefix-on-managed-objects',
'Set to true if you want to use the realm name as a prefix on managed object configuration, e.g. managed/alpha_user,\
managed/alpha_application or managed/bravo_organization. When false, the default behaviour of using managed/user \
etc. is retained. \
This option is ignored when the deployment type is "cloud".'
);

const flushCacheOption = new Option('--flush-cache', 'Flush token cache.');

const defaultArgs = [
Expand All @@ -126,6 +134,7 @@ const defaultOpts = [
curlirizeOption,
noCacheOption,
flushCacheOption,
useRealmPrefixOnManagedObjects,
];

const stateMap = {
Expand Down Expand Up @@ -166,6 +175,8 @@ const stateMap = {
state.setCurlirize(curlirize),
[noCacheOption.attributeName()]: (cache: boolean) =>
state.setUseTokenCache(cache),
[useRealmPrefixOnManagedObjects.attributeName()]: () =>
state.setUseRealmPrefixOnManagedObjects(true),
[flushCacheOption.attributeName()]: (flush: boolean) => {
if (flush) frodo.cache.flush();
},
Expand Down