@nestledjs/api 2.1.0 → 2.2.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nestledjs/api",
3
- "version": "2.1.0",
3
+ "version": "2.2.0",
4
4
  "generators": "./generators.json",
5
5
  "type": "commonjs",
6
6
  "main": "./src/index.js",
@@ -329,7 +329,9 @@ function generateEnums(enums: readonly any[]): string {
329
329
 
330
330
  if (enums.length > 0) {
331
331
  const enumNames = enums.map(e => e.name).join(', ')
332
- output += `export { ${enumNames} } from '${prismaImportPath}';\n\n`
332
+ // Import first to make enums available in scope, then export separately
333
+ output += `import { ${enumNames} } from '${prismaImportPath}';\n`
334
+ output += `export { ${enumNames} };\n\n`
333
335
 
334
336
  enums.forEach(enumType => {
335
337
  output += `registerEnumType(${enumType.name}, { name: '${enumType.name}' });\n\n`