orchid-orm 1.5.21 → 1.5.23

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,17 @@
1
1
  # orchid-orm
2
2
 
3
+ ## 1.5.23
4
+
5
+ ### Patch Changes
6
+
7
+ - Fix relative path resolution on windows for orm codegen
8
+
9
+ ## 1.5.22
10
+
11
+ ### Patch Changes
12
+
13
+ - Make codegen to not add table to the main file when the key already exist
14
+
3
15
  ## 1.5.21
4
16
 
5
17
  ### Patch Changes
package/dist/index.js CHANGED
@@ -1591,7 +1591,7 @@ const ts = {
1591
1591
  };
1592
1592
 
1593
1593
  const getImportPath = (from, to) => {
1594
- const rel = path__default["default"].posix.relative(path__default["default"].dirname(from), to);
1594
+ const rel = path__default["default"].relative(path__default["default"].dirname(from), to).split(path__default["default"].sep).join(path__default["default"].posix.sep);
1595
1595
  const importPath = rel.startsWith("./") || rel.startsWith("../") ? rel : `./${rel}`;
1596
1596
  return importPath.replace(/\.[tj]s$/, "");
1597
1597
  };
@@ -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,