@514labs/moose-lib 0.6.239-ci-4-g4348a9e3 → 0.6.239-ci-6-g7634f0cb
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.js
CHANGED
|
@@ -1010,7 +1010,20 @@ var typiaTypeGuard = (node) => {
|
|
|
1010
1010
|
var transformNewMooseResource = (node, checker) => {
|
|
1011
1011
|
const typeName = checker.getSymbolAtLocation(node.expression).name;
|
|
1012
1012
|
const typeNode = node.typeArguments[0];
|
|
1013
|
-
|
|
1013
|
+
let ingestPipelineHasTable = true;
|
|
1014
|
+
if (typeName === "IngestPipeline" && node.arguments && node.arguments.length >= 2) {
|
|
1015
|
+
const configArg = node.arguments[1];
|
|
1016
|
+
if (import_typescript4.default.isObjectLiteralExpression(configArg)) {
|
|
1017
|
+
const tableProperty = configArg.properties.find(
|
|
1018
|
+
(prop) => import_typescript4.default.isPropertyAssignment(prop) && import_typescript4.default.isIdentifier(prop.name) && prop.name.text === "table"
|
|
1019
|
+
);
|
|
1020
|
+
if (tableProperty) {
|
|
1021
|
+
const tableValue = tableProperty.initializer;
|
|
1022
|
+
ingestPipelineHasTable = tableValue.kind !== import_typescript4.default.SyntaxKind.FalseKeyword;
|
|
1023
|
+
}
|
|
1024
|
+
}
|
|
1025
|
+
}
|
|
1026
|
+
const allowIndexSignatures = ["IngestApi", "Stream"].includes(typeName) || typeName === "IngestPipeline" && !ingestPipelineHasTable;
|
|
1014
1027
|
const typeAtLocation = checker.getTypeAtLocation(typeNode);
|
|
1015
1028
|
const hasIndexSignature = allowIndexSignatures && checker.getIndexInfosOfType(typeAtLocation).length > 0;
|
|
1016
1029
|
const internalArguments = typeName === "DeadLetterQueue" ? [typiaTypeGuard(node)] : [
|