mirror of
https://github.com/LukeHagar/redocly-cli.git
synced 2025-12-07 04:21:11 +00:00
chore: clean organization id (#1142)
This commit is contained in:
@@ -556,9 +556,13 @@ function cleanString(value?: string): string | undefined {
|
||||
}
|
||||
|
||||
export function cleanArgs(args: CommandOptions) {
|
||||
const keysToClean = ['organization', 'o'];
|
||||
|
||||
const result: Record<string, unknown> = {};
|
||||
for (const [key, value] of Object.entries(args)) {
|
||||
if (typeof value === 'string') {
|
||||
if (keysToClean.includes(key)) {
|
||||
result[key] = '***';
|
||||
} else if (typeof value === 'string') {
|
||||
result[key] = cleanString(value);
|
||||
} else if (Array.isArray(value)) {
|
||||
result[key] = value.map(cleanString);
|
||||
|
||||
Reference in New Issue
Block a user