@kosdev-code/kos-codegen-core 0.1.0-next.781 → 0.1.0-next.782

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/index.mjs CHANGED
@@ -585,6 +585,13 @@ function updateModelIndex(codegenFs, indexPath, modelPath) {
585
585
  ts.ScriptTarget.Latest,
586
586
  true
587
587
  );
588
+ const alreadyExported = sourceFile.statements.some(
589
+ (st) => ts.isExportDeclaration(st) && st.moduleSpecifier !== void 0 && ts.isStringLiteral(st.moduleSpecifier) && st.moduleSpecifier.text === `./${modelPath}`
590
+ );
591
+ if (alreadyExported) {
592
+ logger.info(`Export for ${modelPath} already present in ${indexPath}`);
593
+ return;
594
+ }
588
595
  const exportDeclaration = ts.factory.createExportDeclaration(
589
596
  void 0,
590
597
  false,