create-projx 1.5.3 → 1.5.4

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.
Files changed (2) hide show
  1. package/dist/index.js +3 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -2766,7 +2766,7 @@ function generateFastapiTest(config) {
2766
2766
  lines.push(`from datetime import ${dateImports.join(", ")}`);
2767
2767
  lines.push("");
2768
2768
  }
2769
- lines.push(`from src.entities.${snake}._model import ${className}`);
2769
+ lines.push(`from src.entities.${snake} import ${className}`);
2770
2770
  lines.push(`from tests.base_entity_api_test import BaseEntityApiTest`);
2771
2771
  lines.push("");
2772
2772
  lines.push("");
@@ -2902,7 +2902,9 @@ async function gen(cwd, entityName, fieldsFlag, backendFlag) {
2902
2902
  } else {
2903
2903
  await mkdir5(entityDir, { recursive: true });
2904
2904
  await writeFile5(join12(entityDir, "_model.py"), generateFastAPIModel(config));
2905
+ await writeFile5(join12(entityDir, "__init__.py"), "from ._model import *\n");
2905
2906
  generated.push(`${dir}/src/entities/${toSnake(config.name)}/_model.py`);
2907
+ generated.push(`${dir}/src/entities/${toSnake(config.name)}/__init__.py`);
2906
2908
  const testsDir = join12(cwd, dir, "tests");
2907
2909
  const testFile = join12(testsDir, `test_${toSnake(config.name)}_entity.py`);
2908
2910
  if (existsSync11(testsDir) && !existsSync11(testFile)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-projx",
3
- "version": "1.5.3",
3
+ "version": "1.5.4",
4
4
  "description": "Scaffold production-grade fullstack projects in seconds. FastAPI, Fastify, React, Flutter, Terraform — with auth, database, CI/CD, E2E tests, and Docker. One command, ready to deploy.",
5
5
  "type": "module",
6
6
  "bin": {