Skip to content

Commit 1bce01c

Browse files
remove compiler plugin logs from moose dev terminal (#2971)
<!-- CURSOR_SUMMARY --> > [!NOTE] > Prefixes console log messages with [CompilerPlugin] across `typeConvert.ts` for clearer logging context. > > - **Logging**: > - Add `[CompilerPlugin]` prefix to console logs in `packages/ts-moose-lib/src/dataModels/typeConvert.ts`: > - Aggregation handlers: `Aggregated`, `SimpleAggregated` unexpected types. > - Typia tag handling: missing `Props.value`, unsupported number types, unknown string formats. > - Column/index handling: index info logging in `toColumns`. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit fc4192d. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
1 parent f75c9ee commit 1bce01c

File tree

1 file changed

+16
-7
lines changed

1 file changed

+16
-7
lines changed

packages/ts-moose-lib/src/dataModels/typeConvert.ts

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,10 @@ const handleAggregated = (
114114
);
115115
return { functionName: functionStringLiteral.value, argumentTypes };
116116
} else {
117-
console.log("Unexpected type inside Aggregated", functionStringLiteral);
117+
console.log(
118+
"[CompilerPlugin] Unexpected type inside Aggregated",
119+
functionStringLiteral,
120+
);
118121
return undefined;
119122
}
120123
};
@@ -282,7 +285,7 @@ const handleSimpleAggregated = (
282285
return { functionName: functionStringLiteral.value, argumentType };
283286
} else {
284287
console.log(
285-
"Unexpected type inside SimpleAggregated",
288+
"[CompilerPlugin] Unexpected type inside SimpleAggregated",
286289
functionStringLiteral,
287290
);
288291
return undefined;
@@ -352,7 +355,9 @@ const handleNumberType = (
352355
for (const prop of props) {
353356
const valueSymbol = prop.getProperty("value");
354357
if (valueSymbol === undefined) {
355-
console.log(`Props.value is undefined for ${fieldName}`);
358+
console.log(
359+
`[CompilerPlugin] Props.value is undefined for ${fieldName}`,
360+
);
356361
} else {
357362
const valueTypeLiteral = checker.getTypeOfSymbol(valueSymbol);
358363
const numberTypeMappings = {
@@ -379,7 +384,7 @@ const handleNumberType = (
379384
: "unknown";
380385

381386
console.log(
382-
`Other number types are not supported: ${typeString} in field ${fieldName}`,
387+
`[CompilerPlugin] Other number types are not supported: ${typeString} in field ${fieldName}`,
383388
);
384389
}
385390
}
@@ -442,7 +447,9 @@ const handleStringType = (
442447
for (const prop of props) {
443448
const valueSymbol = prop.getProperty("value");
444449
if (valueSymbol === undefined) {
445-
console.log(`Props.value is undefined for ${fieldName}`);
450+
console.log(
451+
`[CompilerPlugin] Props.value is undefined for ${fieldName}`,
452+
);
446453
} else {
447454
const valueTypeLiteral = checker.getTypeOfSymbol(valueSymbol);
448455
if (isStringLiteral(valueTypeLiteral, checker, "uuid")) {
@@ -514,7 +521,9 @@ const handleStringType = (
514521
valueTypeLiteral.value
515522
: "unknown";
516523

517-
console.log(`Unknown format: ${typeString} in field ${fieldName}`);
524+
console.log(
525+
`[CompilerPlugin] Unknown format: ${typeString} in field ${fieldName}`,
526+
);
518527
}
519528
}
520529
}
@@ -915,7 +924,7 @@ const handleDefaultWrapping = (
915924

916925
export const toColumns = (t: ts.Type, checker: TypeChecker): Column[] => {
917926
if (checker.getIndexInfosOfType(t).length !== 0) {
918-
console.log(checker.getIndexInfosOfType(t));
927+
console.log("[CompilerPlugin]", checker.getIndexInfosOfType(t));
919928
throwIndexTypeError(t, checker);
920929
}
921930

0 commit comments

Comments
 (0)