Skip to content
Draft
Show file tree
Hide file tree
Changes from all 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
120 changes: 63 additions & 57 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 @@ -103,7 +103,6 @@
"axios": "^1.13.4",
"axios-mock-adapter": "^2.1.0",
"axios-retry": "^4.4.0",
"colors": "^1.4.0",
"copyfiles": "^2.4.1",
"del": "^8.0.0",
"eslint": "^9.39.2",
Expand Down Expand Up @@ -131,6 +130,7 @@
"setup-polly-jest": "^0.11.0",
"slugify": "^1.6.5",
"sshpk": "^1.18.0",
"tinyrainbow": "^3.0.3",
"ts-jest": "^29.1.2",
"tsup": "^8.0.2",
"typedoc": "^0.28.16",
Expand Down
7 changes: 4 additions & 3 deletions src/ops/AuthenticateOps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { URL } from 'url';
import { AxiosError, AxiosRequestConfig, AxiosResponse } from 'axios';
import jose from 'node-jose';
import sshpk from 'sshpk';
import c from 'tinyrainbow';
import { v4 } from 'uuid';

import {
Expand Down Expand Up @@ -383,7 +384,7 @@ async function determineDeploymentType(state: State): Promise<string> {
e.response.headers?.location?.indexOf('code=') > -1
) {
verboseMessage({
message: `ForgeRock Identity Cloud`['brightCyan'] + ` detected.`,
message: c.cyan(`ForgeRock Identity Cloud`) + ` detected.`,
state,
});
deploymentType = Constants.CLOUD_DEPLOYMENT_TYPE_KEY;
Expand All @@ -404,13 +405,13 @@ async function determineDeploymentType(state: State): Promise<string> {
// maybe we don't want to run through the auto-detect code if we get a custom admin client id?
adminClientId = state.getAdminClientId() || forgeopsClientId;
verboseMessage({
message: `ForgeOps deployment`['brightCyan'] + ` detected.`,
message: c.cyan(`ForgeOps deployment`) + ` detected.`,
state,
});
deploymentType = Constants.FORGEOPS_DEPLOYMENT_TYPE_KEY;
} else {
verboseMessage({
message: `Classic deployment`['brightCyan'] + ` detected.`,
message: c.cyan(`Classic deployment`) + ` detected.`,
state,
});
}
Expand Down
9 changes: 5 additions & 4 deletions src/shared/State.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {
IAxiosRetryConfig,
isNetworkOrIdempotentRequestError,
} from 'axios-retry';
import c from 'tinyrainbow';
import winston from 'winston';

import { RetryStrategy } from '../api/BaseApi';
Expand Down Expand Up @@ -686,11 +687,11 @@ const globalState: StateInterface = {
}
},
errorHandler: (error: Error, message?: string) => {
if (message) process.stderr.write('' + message['brightRed']);
if (message) process.stderr.write('' + c.red(message));
switch (error.name) {
case 'FrodoError':
process.stderr.write(
'' + (error as FrodoError).getCombinedMessage()['brightRed']
'' + c.red((error as FrodoError).getCombinedMessage())
);
break;

Expand All @@ -712,12 +713,12 @@ const globalState: StateInterface = {
errorMessage += status ? `\n Status: ${status}` : '';
errorMessage += message ? `\n Message: ${message}` : '';
errorMessage += detail ? `\n Detail: ${detail}` : '';
process.stderr.write(errorMessage['brightRed']);
process.stderr.write(c.red(errorMessage));
break;
}

default:
process.stderr.write(error.message['brightRed']);
process.stderr.write(c.red(error.message));
break;
}
},
Expand Down