@514labs/moose-lib 0.6.239-ci-1-g1e5af572 → 0.6.239-ci-4-g4348a9e3

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.
Files changed (35) hide show
  1. package/dist/{browserCompatible-CMLITD0_.d.ts → browserCompatible-B3DCF1U4.d.ts} +1 -1
  2. package/dist/{browserCompatible-BRa8sgXw.d.mts → browserCompatible-BonAvoqJ.d.mts} +1 -1
  3. package/dist/browserCompatible.d.mts +2 -2
  4. package/dist/browserCompatible.d.ts +2 -2
  5. package/dist/browserCompatible.js +24 -16
  6. package/dist/browserCompatible.js.map +1 -1
  7. package/dist/browserCompatible.mjs +24 -16
  8. package/dist/browserCompatible.mjs.map +1 -1
  9. package/dist/compilerPlugin.js +22 -3
  10. package/dist/compilerPlugin.js.map +1 -1
  11. package/dist/compilerPlugin.mjs +22 -3
  12. package/dist/compilerPlugin.mjs.map +1 -1
  13. package/dist/dataModels/toDataModels.js +2 -2
  14. package/dist/dataModels/toDataModels.js.map +1 -1
  15. package/dist/dataModels/toDataModels.mjs +2 -2
  16. package/dist/dataModels/toDataModels.mjs.map +1 -1
  17. package/dist/dmv2/index.d.mts +1 -1
  18. package/dist/dmv2/index.d.ts +1 -1
  19. package/dist/dmv2/index.js +24 -16
  20. package/dist/dmv2/index.js.map +1 -1
  21. package/dist/dmv2/index.mjs +24 -16
  22. package/dist/dmv2/index.mjs.map +1 -1
  23. package/dist/{index-BG2HP0xG.d.mts → index-DsCMbhN3.d.mts} +13 -4
  24. package/dist/{index-BG2HP0xG.d.ts → index-DsCMbhN3.d.ts} +13 -4
  25. package/dist/index.d.mts +3 -3
  26. package/dist/index.d.ts +3 -3
  27. package/dist/index.js +24 -13
  28. package/dist/index.js.map +1 -1
  29. package/dist/index.mjs +24 -13
  30. package/dist/index.mjs.map +1 -1
  31. package/dist/moose-runner.js +2 -1
  32. package/dist/moose-runner.js.map +1 -1
  33. package/dist/moose-runner.mjs +2 -1
  34. package/dist/moose-runner.mjs.map +1 -1
  35. package/package.json +1 -1
@@ -921,8 +921,8 @@ var handleCodec = (t, checker) => {
921
921
  }
922
922
  return codecType.value;
923
923
  };
924
- var toColumns = (t, checker) => {
925
- if (checker.getIndexInfosOfType(t).length !== 0) {
924
+ var toColumns = (t, checker, options) => {
925
+ if (!options?.allowIndexSignatures && checker.getIndexInfosOfType(t).length !== 0) {
926
926
  console.log("[CompilerPlugin]", checker.getIndexInfosOfType(t));
927
927
  throwIndexTypeError(t, checker);
928
928
  }
@@ -1010,11 +1010,16 @@ 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
+ const allowIndexSignatures = ["IngestApi", "Stream"].includes(typeName);
1014
+ const typeAtLocation = checker.getTypeAtLocation(typeNode);
1015
+ const hasIndexSignature = allowIndexSignatures && checker.getIndexInfosOfType(typeAtLocation).length > 0;
1013
1016
  const internalArguments = typeName === "DeadLetterQueue" ? [typiaTypeGuard(node)] : [
1014
1017
  typiaJsonSchemas(typeNode),
1015
1018
  parseAsAny(
1016
1019
  JSON.stringify(
1017
- toColumns(checker.getTypeAtLocation(typeNode), checker)
1020
+ toColumns(typeAtLocation, checker, {
1021
+ allowIndexSignatures
1022
+ })
1018
1023
  )
1019
1024
  )
1020
1025
  ];
@@ -1045,6 +1050,20 @@ var transformNewMooseResource = (node, checker) => {
1045
1050
  true
1046
1051
  );
1047
1052
  updatedArgs = [...updatedArgs, validatorsObject];
1053
+ if (resourceName === "IngestPipeline") {
1054
+ updatedArgs = [
1055
+ ...updatedArgs,
1056
+ hasIndexSignature ? import_typescript4.factory.createTrue() : import_typescript4.factory.createFalse()
1057
+ ];
1058
+ }
1059
+ }
1060
+ if (resourceName === "IngestApi" || resourceName === "Stream") {
1061
+ updatedArgs = [
1062
+ ...updatedArgs,
1063
+ import_typescript4.factory.createIdentifier("undefined"),
1064
+ // validators (not used for these types)
1065
+ hasIndexSignature ? import_typescript4.factory.createTrue() : import_typescript4.factory.createFalse()
1066
+ ];
1048
1067
  }
1049
1068
  return import_typescript4.default.factory.updateNewExpression(
1050
1069
  node,