orchid-orm 1.5.21 → 1.5.22

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # orchid-orm
2
2
 
3
+ ## 1.5.22
4
+
5
+ ### Patch Changes
6
+
7
+ - Make codegen to not add table to the main file when the key already exist
8
+
3
9
  ## 1.5.21
4
10
 
5
11
  ### Patch Changes
package/dist/index.js CHANGED
@@ -1679,6 +1679,11 @@ const createTable$1 = ({ filePath, tablePath, statements, object, content, space
1679
1679
  );
1680
1680
  if (existing.length)
1681
1681
  return;
1682
+ for (const prop of object.properties) {
1683
+ if (key === ts.prop.getName(prop)) {
1684
+ return;
1685
+ }
1686
+ }
1682
1687
  const importPos = ts.import.getEndPos(statements);
1683
1688
  changes.add(
1684
1689
  importPos,