@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.js CHANGED
@@ -607,6 +607,13 @@ function updateModelIndex(codegenFs, indexPath, modelPath) {
607
607
  ts__namespace.ScriptTarget.Latest,
608
608
  true
609
609
  );
610
+ const alreadyExported = sourceFile.statements.some(
611
+ (st) => ts__namespace.isExportDeclaration(st) && st.moduleSpecifier !== void 0 && ts__namespace.isStringLiteral(st.moduleSpecifier) && st.moduleSpecifier.text === `./${modelPath}`
612
+ );
613
+ if (alreadyExported) {
614
+ logger.info(`Export for ${modelPath} already present in ${indexPath}`);
615
+ return;
616
+ }
610
617
  const exportDeclaration = ts__namespace.factory.createExportDeclaration(
611
618
  void 0,
612
619
  false,