diff --git a/.github/workflows/provider_image.yml b/.github/workflows/provider_image.yml index c13ef0fe80..35c40cce3c 100644 --- a/.github/workflows/provider_image.yml +++ b/.github/workflows/provider_image.yml @@ -5,7 +5,7 @@ name: provider_image on: pull_request: branches: [main, dev, staging, release/*] - types: + types: - opened # when a PR is opened - synchronize # when a PR is pushed to - reopened # when a PR is reopened @@ -151,7 +151,7 @@ jobs: sleep 20s docker logs "$CONTAINER" >& provider.log cat provider.log - grep -oE "Version: \".*\"" provider.log || (cat provider.log && exit 1) + grep -oE "Version: \\\\\".*\\\\\"" provider.log || (cat provider.log && exit 1) - name: Build the provider-mock package id: build_provider_mock_package diff --git a/packages/cli/src/cli.ts b/packages/cli/src/cli.ts index 31f4ae9cc8..0f83fcb2e9 100644 --- a/packages/cli/src/cli.ts +++ b/packages/cli/src/cli.ts @@ -32,8 +32,6 @@ async function main() { unsolved: { count: 0 }, }); - log.info(config); - if (config.devOnlyWatchEvents) { log.warn( ` diff --git a/packages/cli/src/tests/bundle/bundle.unit.test.ts b/packages/cli/src/tests/bundle/bundle.unit.test.ts index 34a967adb1..79693fca48 100644 --- a/packages/cli/src/tests/bundle/bundle.unit.test.ts +++ b/packages/cli/src/tests/bundle/bundle.unit.test.ts @@ -29,6 +29,6 @@ describe("provider bundle", () => { const { stdout: runOut, stderr: runErr } = await execPromise( `cd ${rootDir} && node dist/bundle/provider.cli.bundle.js version`, ); - assert(runOut.includes("Version:")); + assert(runErr.includes("Version:")); }, 120000); }); diff --git a/packages/common/src/logger.ts b/packages/common/src/logger.ts index 43acdcdace..d8dbcccf0e 100644 --- a/packages/common/src/logger.ts +++ b/packages/common/src/logger.ts @@ -11,7 +11,10 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -import { LogLevels as ConsolaLogLevels, createConsola } from "consola/browser"; +import consola, { + LogLevels as ConsolaLogLevels, + createConsola, +} from "consola/browser"; import { enum as zEnum, type infer as zInfer } from "zod"; import { ProsopoEnvError } from "./error.js"; @@ -47,8 +50,18 @@ export function getLoggerDefault(): Logger { return defaultLogger; } +// biome-ignore lint/suspicious/noExplicitAny: we should be able to log anything we want, plus we can't control what external libraries log +const JSONReporter = (message: any) => { + process.stderr.write(`${JSON.stringify(message)}\n`); +}; + const getLoggerAdapterConsola = (logLevel: LogLevel, scope: string): Logger => { const logger = createConsola({ + reporters: [ + { + log: JSONReporter, + }, + ], formatOptions: { colors: true, date: true }, }).withTag(scope); let currentLevel = logLevel;