Skip to content

Commit

Permalink
Merge pull request #349 from rockcarver/pr/348
Browse files Browse the repository at this point in the history
Pr/348
  • Loading branch information
vscheuber authored Jan 3, 2024
2 parents 8f48eb2 + 459fb5f commit 9b40df3
Show file tree
Hide file tree
Showing 100 changed files with 43,140 additions and 73,038 deletions.
12 changes: 6 additions & 6 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@
]
},
"dependencies": {
"@rockcarver/frodo-lib": "2.0.0-57",
"@rockcarver/frodo-lib": "2.0.0-58",
"chokidar": "^3.5.3",
"cli-progress": "^3.11.2",
"cli-table3": "^0.6.3",
Expand Down
8 changes: 7 additions & 1 deletion src/cli/admin/admin-execute-rfc7523-authz-grant-flow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,13 @@ program
'brightCyan'
] +
`\nRelated Commands:\n` +
` Run ${'frodo admin generate-rfc7523-authz-grant-artefacts --help'['brightCyan']} to see how to create the required configuration artefacts for ${'frodo admin execute-rfc7523-authz-grant-flow'['brightCyan']}:\n`
` Run ${

Check warning on line 56 in src/cli/admin/admin-execute-rfc7523-authz-grant-flow.ts

View workflow job for this annotation

GitHub Actions / Build

Replace `⏎········'frodo·admin·generate-rfc7523-authz-grant-artefacts·--help'[⏎··········'brightCyan'⏎········]⏎······}·to·see·how·to·create·the·required·configuration·artefacts·for·${⏎········'frodo·admin·execute-rfc7523-authz-grant-flow'['brightCyan']⏎······` with `'frodo·admin·generate-rfc7523-authz-grant-artefacts·--help'['brightCyan']}·to·see·how·to·create·the·required·configuration·artefacts·for·${'frodo·admin·execute-rfc7523-authz-grant-flow'['brightCyan']`
'frodo admin generate-rfc7523-authz-grant-artefacts --help'[
'brightCyan'
]
} to see how to create the required configuration artefacts for ${
'frodo admin execute-rfc7523-authz-grant-flow'['brightCyan']
}:\n`
)
.action(
// implement command logic inside action handler
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,11 @@ program
'brightCyan'
] +
`\nRelated Commands:\n` +
` Run ${'frodo admin execute-rfc7523-authz-grant-flow --help'['brightCyan']} to see how to test your configuration created with ${'frodo admin generate-rfc7523-authz-grant-artefacts'['brightCyan']}:\n`
` Run ${

Check warning on line 70 in src/cli/admin/admin-generate-rfc7523-authz-grant-artefacts.ts

View workflow job for this annotation

GitHub Actions / Build

Replace `⏎········'frodo·admin·execute-rfc7523-authz-grant-flow·--help'['brightCyan']⏎······}·to·see·how·to·test·your·configuration·created·with·${⏎········'frodo·admin·generate-rfc7523-authz-grant-artefacts'['brightCyan']⏎······` with `'frodo·admin·execute-rfc7523-authz-grant-flow·--help'['brightCyan']}·to·see·how·to·test·your·configuration·created·with·${'frodo·admin·generate-rfc7523-authz-grant-artefacts'['brightCyan']`
'frodo admin execute-rfc7523-authz-grant-flow --help'['brightCyan']
} to see how to test your configuration created with ${
'frodo admin generate-rfc7523-authz-grant-artefacts'['brightCyan']
}:\n`
)
.action(
// implement command logic inside action handler
Expand Down
12 changes: 10 additions & 2 deletions src/cli/app/app-delete.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,16 @@ program
.addHelpText(
'after',
`Important Note:\n`['brightYellow'] +
` The ${'frodo app'['brightCyan']} command to manage OAuth2 clients in v1.x has been renamed to ${'frodo oauth client'['brightCyan']} in v2.x\n` +
` The ${'frodo app'['brightCyan']} command in v2.x manages the new applications created using the new application templates in ForgeRock Identity Cloud. To manage oauth clients, use the ${'frodo oauth client'['brightCyan']} command.\n\n` +
` The ${

Check warning on line 36 in src/cli/app/app-delete.ts

View workflow job for this annotation

GitHub Actions / Build

Replace `⏎········'frodo·app'['brightCyan']⏎······}·command·to·manage·OAuth2·clients·in·v1.x·has·been·renamed·to·${⏎········'frodo·oauth·client'['brightCyan']⏎······` with `'frodo·app'['brightCyan']}·command·to·manage·OAuth2·clients·in·v1.x·has·been·renamed·to·${'frodo·oauth·client'['brightCyan']`
'frodo app'['brightCyan']
} command to manage OAuth2 clients in v1.x has been renamed to ${
'frodo oauth client'['brightCyan']
} in v2.x\n` +
` The ${

Check warning on line 41 in src/cli/app/app-delete.ts

View workflow job for this annotation

GitHub Actions / Build

Replace `⏎········'frodo·app'['brightCyan']⏎······}·command·in·v2.x·manages·the·new·applications·created·using·the·new·application·templates·in·ForgeRock·Identity·Cloud.·To·manage·oauth·clients,·use·the·${⏎········'frodo·oauth·client'['brightCyan']⏎······` with `'frodo·app'['brightCyan']}·command·in·v2.x·manages·the·new·applications·created·using·the·new·application·templates·in·ForgeRock·Identity·Cloud.·To·manage·oauth·clients,·use·the·${'frodo·oauth·client'['brightCyan']`
'frodo app'['brightCyan']
} command in v2.x manages the new applications created using the new application templates in ForgeRock Identity Cloud. To manage oauth clients, use the ${
'frodo oauth client'['brightCyan']
} command.\n\n` +
`Usage Examples:\n` +
` Delete application 'myApp':\n` +
` $ frodo app delete -i 'myApp' ${s.amBaseUrl}\n`['brightCyan'] +
Expand Down
12 changes: 10 additions & 2 deletions src/cli/app/app-describe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,16 @@ program
.addHelpText(
'after',
`Important Note:\n`['brightYellow'] +
` The ${'frodo app'['brightCyan']} command to manage OAuth2 clients in v1.x has been renamed to ${'frodo oauth client'['brightCyan']} in v2.x\n` +
` The ${'frodo app'['brightCyan']} command in v2.x manages the new applications created using the new application templates in ForgeRock Identity Cloud. To manage oauth clients, use the ${'frodo oauth client'['brightCyan']} command.\n\n` +
` The ${

Check warning on line 17 in src/cli/app/app-describe.ts

View workflow job for this annotation

GitHub Actions / Build

Replace `⏎········'frodo·app'['brightCyan']⏎······}·command·to·manage·OAuth2·clients·in·v1.x·has·been·renamed·to·${⏎········'frodo·oauth·client'['brightCyan']⏎······` with `'frodo·app'['brightCyan']}·command·to·manage·OAuth2·clients·in·v1.x·has·been·renamed·to·${'frodo·oauth·client'['brightCyan']`
'frodo app'['brightCyan']
} command to manage OAuth2 clients in v1.x has been renamed to ${
'frodo oauth client'['brightCyan']
} in v2.x\n` +
` The ${

Check warning on line 22 in src/cli/app/app-describe.ts

View workflow job for this annotation

GitHub Actions / Build

Replace `⏎········'frodo·app'['brightCyan']⏎······}·command·in·v2.x·manages·the·new·applications·created·using·the·new·application·templates·in·ForgeRock·Identity·Cloud.·To·manage·oauth·clients,·use·the·${⏎········'frodo·oauth·client'['brightCyan']⏎······` with `'frodo·app'['brightCyan']}·command·in·v2.x·manages·the·new·applications·created·using·the·new·application·templates·in·ForgeRock·Identity·Cloud.·To·manage·oauth·clients,·use·the·${'frodo·oauth·client'['brightCyan']`
'frodo app'['brightCyan']
} command in v2.x manages the new applications created using the new application templates in ForgeRock Identity Cloud. To manage oauth clients, use the ${
'frodo oauth client'['brightCyan']
} command.\n\n` +
`Usage Examples:\n` +
` Describe application 'myApp':\n` +
` $ frodo app describe -i myApp ${s.connId}\n`['brightCyan'] +
Expand Down
12 changes: 10 additions & 2 deletions src/cli/app/app-export.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,16 @@ program
.addHelpText(
'after',
`Important Note:\n`['brightYellow'] +
` The ${'frodo app'['brightCyan']} command to manage OAuth2 clients in v1.x has been renamed to ${'frodo oauth client'['brightCyan']} in v2.x\n` +
` The ${'frodo app'['brightCyan']} command in v2.x manages the new applications created using the new application templates in ForgeRock Identity Cloud. To manage oauth clients, use the ${'frodo oauth client'['brightCyan']} command.\n\n` +
` The ${

Check warning on line 50 in src/cli/app/app-export.ts

View workflow job for this annotation

GitHub Actions / Build

Replace `⏎········'frodo·app'['brightCyan']⏎······}·command·to·manage·OAuth2·clients·in·v1.x·has·been·renamed·to·${⏎········'frodo·oauth·client'['brightCyan']⏎······` with `'frodo·app'['brightCyan']}·command·to·manage·OAuth2·clients·in·v1.x·has·been·renamed·to·${'frodo·oauth·client'['brightCyan']`
'frodo app'['brightCyan']
} command to manage OAuth2 clients in v1.x has been renamed to ${
'frodo oauth client'['brightCyan']
} in v2.x\n` +
` The ${

Check warning on line 55 in src/cli/app/app-export.ts

View workflow job for this annotation

GitHub Actions / Build

Replace `⏎········'frodo·app'['brightCyan']⏎······}·command·in·v2.x·manages·the·new·applications·created·using·the·new·application·templates·in·ForgeRock·Identity·Cloud.·To·manage·oauth·clients,·use·the·${⏎········'frodo·oauth·client'['brightCyan']⏎······` with `'frodo·app'['brightCyan']}·command·in·v2.x·manages·the·new·applications·created·using·the·new·application·templates·in·ForgeRock·Identity·Cloud.·To·manage·oauth·clients,·use·the·${'frodo·oauth·client'['brightCyan']`
'frodo app'['brightCyan']
} command in v2.x manages the new applications created using the new application templates in ForgeRock Identity Cloud. To manage oauth clients, use the ${
'frodo oauth client'['brightCyan']
} command.\n\n` +
`Usage Examples:\n` +
` Export all applications to a single export file with an auto-generated filename using a connection profile:\n` +
` $ frodo app export -a ${s.connId}\n`['brightCyan'] +
Expand Down
12 changes: 10 additions & 2 deletions src/cli/app/app-import.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,16 @@ program
.addHelpText(
'after',
`Important Note:\n`['brightYellow'] +
` The ${'frodo app'['brightCyan']} command to manage OAuth2 clients in v1.x has been renamed to ${'frodo oauth client'['brightCyan']} in v2.x\n` +
` The ${'frodo app'['brightCyan']} command in v2.x manages the new applications created using the new application templates in ForgeRock Identity Cloud. To manage oauth clients, use the ${'frodo oauth client'['brightCyan']} command.\n\n` +
` The ${

Check warning on line 45 in src/cli/app/app-import.ts

View workflow job for this annotation

GitHub Actions / Build

Replace `⏎········'frodo·app'['brightCyan']⏎······}·command·to·manage·OAuth2·clients·in·v1.x·has·been·renamed·to·${⏎········'frodo·oauth·client'['brightCyan']⏎······` with `'frodo·app'['brightCyan']}·command·to·manage·OAuth2·clients·in·v1.x·has·been·renamed·to·${'frodo·oauth·client'['brightCyan']`
'frodo app'['brightCyan']
} command to manage OAuth2 clients in v1.x has been renamed to ${
'frodo oauth client'['brightCyan']
} in v2.x\n` +
` The ${

Check warning on line 50 in src/cli/app/app-import.ts

View workflow job for this annotation

GitHub Actions / Build

Replace `⏎········'frodo·app'['brightCyan']⏎······}·command·in·v2.x·manages·the·new·applications·created·using·the·new·application·templates·in·ForgeRock·Identity·Cloud.·To·manage·oauth·clients,·use·the·${⏎········'frodo·oauth·client'['brightCyan']⏎······` with `'frodo·app'['brightCyan']}·command·in·v2.x·manages·the·new·applications·created·using·the·new·application·templates·in·ForgeRock·Identity·Cloud.·To·manage·oauth·clients,·use·the·${'frodo·oauth·client'['brightCyan']`
'frodo app'['brightCyan']
} command in v2.x manages the new applications created using the new application templates in ForgeRock Identity Cloud. To manage oauth clients, use the ${
'frodo oauth client'['brightCyan']
} command.\n\n` +
`Usage Examples:\n` +
` Import all applications from a single export file using a connection profile:\n` +
` $ frodo app import -a -f ./allAlphaApplications.application.json ${s.connId}\n`[
Expand Down
12 changes: 10 additions & 2 deletions src/cli/app/app-list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,16 @@ program
.addHelpText(
'after',
`Important Note:\n`['brightYellow'] +
` The ${'frodo app'['brightCyan']} command to manage OAuth2 clients in v1.x has been renamed to ${'frodo oauth client'['brightCyan']} in v2.x\n` +
` The ${'frodo app'['brightCyan']} command in v2.x manages the new applications created using the new application templates in ForgeRock Identity Cloud. To manage oauth clients, use the ${'frodo oauth client'['brightCyan']} command.\n\n` +
` The ${
'frodo app'['brightCyan']
} command to manage OAuth2 clients in v1.x has been renamed to ${
'frodo oauth client'['brightCyan']
} in v2.x\n` +
` The ${
'frodo app'['brightCyan']
} command in v2.x manages the new applications created using the new application templates in ForgeRock Identity Cloud. To manage oauth clients, use the ${
'frodo oauth client'['brightCyan']
} command.\n\n` +
`Usage Examples:\n` +
` List applications using AM base URL, username, and password (note the quotes around password to allow special characters):\n` +
` $ frodo app list ${s.amBaseUrl} ${s.username} '${s.password}'\n`[
Expand Down
12 changes: 10 additions & 2 deletions src/cli/app/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,16 @@ export default function setup() {
.addHelpText(
'after',
`\nImportant Note:\n`['brightYellow'] +
` The ${'frodo app'['brightCyan']} command to manage OAuth2 clients in v1.x has been renamed to ${'frodo oauth client'['brightCyan']} in v2.x\n` +
` The ${'frodo app'['brightCyan']} command in v2.x manages the new applications created using the new application templates in ForgeRock Identity Cloud. To manage oauth clients, use the ${'frodo oauth client'['brightCyan']} command.\n\n`
` The ${
'frodo app'['brightCyan']
} command to manage OAuth2 clients in v1.x has been renamed to ${
'frodo oauth client'['brightCyan']
} in v2.x\n` +
` The ${
'frodo app'['brightCyan']
} command in v2.x manages the new applications created using the new application templates in ForgeRock Identity Cloud. To manage oauth clients, use the ${
'frodo oauth client'['brightCyan']
} command.\n\n`
);

program.command('list', 'List applications.');
Expand Down
8 changes: 8 additions & 0 deletions src/cli/config/config-export.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@ program
'Does not include metadata in the export file.'
)
)
.addOption(
new Option(
'--no-coords',
'Do not include the x and y coordinate positions of the journey/tree nodes.'
)
)
.action(
// implement command logic inside action handler
async (host, realm, user, password, options, command) => {
Expand All @@ -65,6 +71,7 @@ program
await exportEverythingToFile(options.file, options.metadata, {
useStringArrays: options.useStringArrays,
noDecode: options.decode,
coords: options.coords,
});
// require --directory -D for all-separate function
} else if (options.allSeparate && !state.getDirectory()) {
Expand All @@ -80,6 +87,7 @@ program
await exportEverythingToFiles(options.extract, options.metadata, {
useStringArrays: options.useStringArrays,
noDecode: options.decode,
coords: options.coords,
});
// unrecognized combination of options or no options
} else {
Expand Down
9 changes: 9 additions & 0 deletions src/cli/journey/journey-export.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,12 @@ program
'Do not include any dependencies (scripts, email templates, SAML entity providers and circles of trust, social identity providers, themes).'
)
)
.addOption(
new Option(
'--no-coords',
'Do not include the x and y coordinate positions of the journey/tree nodes.'
)
)
// .addOption(
// new Option(
// '-O, --organize <method>',
Expand Down Expand Up @@ -87,6 +93,7 @@ program
{
useStringArrays: options.useStringArrays,
deps: options.deps,
coords: options.coords,
}
);
}
Expand All @@ -96,6 +103,7 @@ program
await exportJourneysToFile(options.file, options.metadata, {
useStringArrays: options.useStringArrays,
deps: options.deps,
coords: options.coords,
});
}
// --all-separate -A
Expand All @@ -104,6 +112,7 @@ program
await exportJourneysToFiles(options.metadata, {
useStringArrays: options.useStringArrays,
deps: options.deps,
coords: options.coords,
});
}
// unrecognized combination of options or no options
Expand Down
2 changes: 2 additions & 0 deletions src/ops/ConfigOps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ export async function exportEverythingToFile(
options: FullExportOptions = {
useStringArrays: true,
noDecode: false,
coords: true,
}
): Promise<void> {
const exportData = await exportFullConfiguration(options);
Expand All @@ -63,6 +64,7 @@ export async function exportEverythingToFiles(
options: FullExportOptions = {
useStringArrays: true,
noDecode: false,
coords: true,
}
): Promise<void> {
const exportData: FullExportInterface =
Expand Down
4 changes: 4 additions & 0 deletions src/ops/JourneyOps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ export async function listJourneys(
exportJourney(journeyStub['_id'], {
useStringArrays: false,
deps: false,
coords: true,
})
);
}
Expand Down Expand Up @@ -163,6 +164,7 @@ export async function exportJourneyToFile(
options: TreeExportOptions = {
deps: false,
useStringArrays: false,
coords: true,
}
): Promise<void> {
debugMessage(`exportJourneyToFile: start`);
Expand Down Expand Up @@ -210,6 +212,7 @@ export async function exportJourneysToFile(
options: TreeExportOptions = {
deps: false,
useStringArrays: false,
coords: true,
}
): Promise<void> {
if (!file) {
Expand All @@ -230,6 +233,7 @@ export async function exportJourneysToFiles(
options: TreeExportOptions = {
deps: false,
useStringArrays: false,
coords: true,
}
): Promise<void> {
const journeysExport = await exportJourneys(options);
Expand Down
1 change: 1 addition & 0 deletions src/utils/Config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ export async function getFullExportConfig(
return await exportFullConfiguration({
useStringArrays: true,
noDecode: false,
coords: true,
});
}
// Go through files in the working directory and reconstruct the full export
Expand Down
2 changes: 2 additions & 0 deletions test/client_cli/en/__snapshots__/config-export.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ Options:
MFA (choices: "classic", "cloud", "forgeops")
-N, --no-metadata Does not include metadata in the export file.
--no-cache Disable token cache for this operation.
--no-coords Do not include the x and y coordinate positions
of the journey/tree nodes.
--no-decode Do not include decoded variable value in
variable export
--sa-id <sa-id> Service account id.
Expand Down
2 changes: 2 additions & 0 deletions test/client_cli/en/__snapshots__/journey-export.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ Options:
MFA (choices: "classic", "cloud", "forgeops")
-N, --no-metadata Does not include metadata in the export file.
--no-cache Disable token cache for this operation.
--no-coords Do not include the x and y coordinate positions
of the journey/tree nodes.
--no-deps Do not include any dependencies (scripts, email
templates, SAML entity providers and circles of
trust, social identity providers, themes).
Expand Down
Loading

0 comments on commit 9b40df3

Please sign in to comment.