orchid-orm 1.5.16 → 1.5.18
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 +16 -0
- package/dist/bin.js +6 -4
- package/dist/bin.js.map +1 -1
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
- package/src/bin/init.test.ts +3 -3
- package/src/bin/init.ts +6 -4
- package/src/codegen/updateMainFile.test.ts +19 -4
- package/src/codegen/updateMainFile.ts +6 -0
package/dist/index.mjs
CHANGED
|
@@ -1647,6 +1647,11 @@ const createTable$1 = ({ filePath, tablePath, statements, object, content, space
|
|
|
1647
1647
|
const value = `${toPascalCase(ast.name)}Table`;
|
|
1648
1648
|
const changes = new FileChanges(content);
|
|
1649
1649
|
const importPath = getImportPath(filePath, tablePath(ast.name));
|
|
1650
|
+
const existing = Array.from(
|
|
1651
|
+
ts.import.iterateWithSource(statements, importPath)
|
|
1652
|
+
);
|
|
1653
|
+
if (existing.length)
|
|
1654
|
+
return;
|
|
1650
1655
|
const importPos = ts.import.getEndPos(statements);
|
|
1651
1656
|
changes.add(
|
|
1652
1657
|
importPos,
|