ext:inspect command to display currently deployed Extensions configuration#10583
ext:inspect command to display currently deployed Extensions configuration#10583Berlioz wants to merge 7 commits into
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces the ext:inspect command to retrieve and display the configuration of currently running extension instances. The feedback points out a critical type mismatch where empty arrays are used as fallbacks for object-typed parameters, which could lead to runtime errors. Additionally, the reviewer notes that console.log should be replaced with the central logger utility to comply with the repository style guide, and suggests adding a 404 status code to the FirebaseError when an extension instance is not found.
| import { last, logLabeledBullet } from "../utils"; | ||
| import { logPrefix } from "../extensions/extensionsHelper"; | ||
| import { FirebaseError } from "../error"; | ||
|
|
||
| import * as clc from "colorette"; |
There was a problem hiding this comment.
Import the central logger utility to replace console.log calls, adhering to the repository style guide (line 29).
| import { last, logLabeledBullet } from "../utils"; | |
| import { logPrefix } from "../extensions/extensionsHelper"; | |
| import { FirebaseError } from "../error"; | |
| import * as clc from "colorette"; | |
| import { last, logLabeledBullet } from "../utils"; | |
| import { logPrefix } from "../extensions/extensionsHelper"; | |
| import { FirebaseError } from "../error"; | |
| import { logger } from "../logger"; | |
| import * as clc from "colorette"; |
References
- Use the central logger (src/logger.ts); never use console.log() for user-facing output. (link)
There was a problem hiding this comment.
This appears to cause Winston's built-in repeat log suppression feature to suppress the output for all but the first extension if multiple extensions are printed in one command. Also, generally, passing the output of this command (where the presence of every line is important) through something that will decide to suppress parts of the output based on the local environment is an extremely bad idea.
No description provided.