@514labs/moose-lib 0.6.263-ci-10-gc7213e03 → 0.6.263-ci-11-g40393f0d
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/compilerPlugin.mjs
CHANGED
|
@@ -1019,7 +1019,15 @@ var transformNewMooseResource = (node, checker) => {
|
|
|
1019
1019
|
}
|
|
1020
1020
|
const allowIndexSignatures = ["IngestApi", "Stream"].includes(typeName) || typeName === "IngestPipeline" && !ingestPipelineHasTable;
|
|
1021
1021
|
const typeAtLocation = checker.getTypeAtLocation(typeNode);
|
|
1022
|
-
const
|
|
1022
|
+
const indexSignatures = checker.getIndexInfosOfType(typeAtLocation);
|
|
1023
|
+
const hasIndexSignature = allowIndexSignatures && indexSignatures.length > 0;
|
|
1024
|
+
if (typeName === "IngestPipeline" && ingestPipelineHasTable && indexSignatures.length > 0) {
|
|
1025
|
+
throw new Error(
|
|
1026
|
+
`IngestPipeline cannot use a type with index signatures when 'table' is configured. Extra fields would be silently dropped when writing to the ClickHouse table. Either:
|
|
1027
|
+
1. Remove the index signature from your type to use a fixed schema, or
|
|
1028
|
+
2. Set 'table: false' in your IngestPipeline config if you only need the API and stream`
|
|
1029
|
+
);
|
|
1030
|
+
}
|
|
1023
1031
|
const internalArguments = typeName === "DeadLetterQueue" ? [typiaTypeGuard(node)] : [
|
|
1024
1032
|
typiaJsonSchemas(typeNode),
|
|
1025
1033
|
parseAsAny(
|