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 +12 -0
- package/dist/index.js +6 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/codegen/updateMainFile.test.ts +19 -4
- package/src/codegen/updateMainFile.ts +6 -0
- package/src/codegen/utils.ts +6 -1
package/dist/index.mjs
CHANGED
|
@@ -1564,7 +1564,7 @@ const ts = {
|
|
|
1564
1564
|
};
|
|
1565
1565
|
|
|
1566
1566
|
const getImportPath = (from, to) => {
|
|
1567
|
-
const rel = path__default.
|
|
1567
|
+
const rel = path__default.relative(path__default.dirname(from), to).split(path__default.sep).join(path__default.posix.sep);
|
|
1568
1568
|
const importPath = rel.startsWith("./") || rel.startsWith("../") ? rel : `./${rel}`;
|
|
1569
1569
|
return importPath.replace(/\.[tj]s$/, "");
|
|
1570
1570
|
};
|
|
@@ -1652,6 +1652,11 @@ const createTable$1 = ({ filePath, tablePath, statements, object, content, space
|
|
|
1652
1652
|
);
|
|
1653
1653
|
if (existing.length)
|
|
1654
1654
|
return;
|
|
1655
|
+
for (const prop of object.properties) {
|
|
1656
|
+
if (key === ts.prop.getName(prop)) {
|
|
1657
|
+
return;
|
|
1658
|
+
}
|
|
1659
|
+
}
|
|
1655
1660
|
const importPos = ts.import.getEndPos(statements);
|
|
1656
1661
|
changes.add(
|
|
1657
1662
|
importPos,
|