@adriankulik/create-fullstack-app 1.12.0 → 1.13.1
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/README.md +1 -1
- package/cli/build-date.js +1 -1
- package/package.json +1 -1
- package/templates/backend/dotnet/Program.cs +2 -2
- package/templates/backend/fastapi/main.py +1 -1
- package/templates/backend/flask/main.py +1 -1
- package/templates/backend/flask/requirements.txt +1 -1
- package/templates/backend/nodejs/src/index.ts +1 -1
- package/templates/base/database/alembic.ini +1 -1
- package/templates/base/database/requirements.txt +1 -1
- package/templates/frontend/angular/src/app/app.component.ts +2 -2
- package/templates/frontend/nextjs/__tests__/page.test.tsx +1 -1
- package/templates/frontend/nextjs/app/page.tsx +1 -1
- package/templates/frontend/nextjs/next.config.js +3 -1
- package/templates/frontend/nextjs/package-lock.json +4 -4
- package/templates/frontend/nextjs/package.json +1 -1
- package/templates/frontend/svelte/src/App.svelte +1 -1
- package/templates/frontend/vue/src/App.vue +1 -1
package/README.md
CHANGED
|
@@ -39,7 +39,7 @@ You will be prompted to choose a project name, your preferred frontend, and back
|
|
|
39
39
|
- Flask (v3.1.3)
|
|
40
40
|
- .NET (v10.0.11)
|
|
41
41
|
- Node.js Express (v5.2.1)
|
|
42
|
-
- **Database**: PostgreSQL (v15) with Alembic (v1.
|
|
42
|
+
- **Database**: PostgreSQL (v15) with Alembic (v1.19.1), SQLAlchemy (v2.0.52), and Psycopg2 (v2.9.12).
|
|
43
43
|
- **Opinionated Defaults**: We bake in sensible, predefined choices (e.g., Angular uses `zone.js`, testing is unified under Playwright and framework-native test runners).
|
|
44
44
|
- **Unified Scripts**: `start.sh`, `test.sh`, and `lint.sh` available out of the box to manage both frontend and backend seamlessly.
|
|
45
45
|
- **CI/CD Ready**: Includes a pre-configured `.github/workflows/cli-e2e.yml` that tests both ends. _Tip: To enforce this, enable branch protection in your GitHub repository settings and require the "test" status check to pass._
|
package/cli/build-date.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
module.exports = '2026-08-
|
|
1
|
+
module.exports = '2026-08-23 21:07:41';
|
package/package.json
CHANGED
|
@@ -16,7 +16,7 @@ var app = builder.Build();
|
|
|
16
16
|
|
|
17
17
|
app.UseCors();
|
|
18
18
|
|
|
19
|
-
var dbUrl = Environment.GetEnvironmentVariable("DATABASE_URL") ?? "postgresql://user:password@
|
|
19
|
+
var dbUrl = Environment.GetEnvironmentVariable("DATABASE_URL") ?? "postgresql://user:password@127.0.0.1:5432/appdb";
|
|
20
20
|
var connStr = dbUrl;
|
|
21
21
|
if (dbUrl.StartsWith("postgres://") || dbUrl.StartsWith("postgresql://"))
|
|
22
22
|
{
|
|
@@ -44,7 +44,7 @@ app.MapPost("/api/multiply", async ([FromBody] MultiplyRequest request) =>
|
|
|
44
44
|
return new { result };
|
|
45
45
|
});
|
|
46
46
|
|
|
47
|
-
app.Run("http://
|
|
47
|
+
app.Run("http://127.0.0.1:8000");
|
|
48
48
|
|
|
49
49
|
class MultiplyRequest
|
|
50
50
|
{
|
|
@@ -20,7 +20,7 @@ class MultiplyRequest(BaseModel):
|
|
|
20
20
|
class MultiplyResponse(BaseModel):
|
|
21
21
|
result: float
|
|
22
22
|
|
|
23
|
-
DATABASE_URL = os.getenv("DATABASE_URL", "postgresql://user:password@
|
|
23
|
+
DATABASE_URL = os.getenv("DATABASE_URL", "postgresql://user:password@127.0.0.1:5432/appdb")
|
|
24
24
|
|
|
25
25
|
def save_calculation(number: float, result: float):
|
|
26
26
|
conn = psycopg2.connect(DATABASE_URL)
|
|
@@ -6,7 +6,7 @@ import psycopg2
|
|
|
6
6
|
app = Flask(__name__)
|
|
7
7
|
CORS(app)
|
|
8
8
|
|
|
9
|
-
DATABASE_URL = os.getenv("DATABASE_URL", "postgresql://user:password@
|
|
9
|
+
DATABASE_URL = os.getenv("DATABASE_URL", "postgresql://user:password@127.0.0.1:5432/appdb")
|
|
10
10
|
|
|
11
11
|
def save_calculation(number: float, result: float):
|
|
12
12
|
conn = psycopg2.connect(DATABASE_URL)
|
|
@@ -7,7 +7,7 @@ app.use(cors());
|
|
|
7
7
|
app.use(express.json());
|
|
8
8
|
|
|
9
9
|
const pool = new Pool({
|
|
10
|
-
connectionString: process.env.DATABASE_URL || 'postgresql://user:password@
|
|
10
|
+
connectionString: process.env.DATABASE_URL || 'postgresql://user:password@127.0.0.1:5432/appdb'
|
|
11
11
|
});
|
|
12
12
|
|
|
13
13
|
app.post('/api/multiply', async (req: Request, res: Response) => {
|
|
@@ -84,7 +84,7 @@ path_separator = os
|
|
|
84
84
|
# database URL. This is consumed by the user-maintained env.py script only.
|
|
85
85
|
# other means of configuring database URLs may be customized within the env.py
|
|
86
86
|
# file.
|
|
87
|
-
sqlalchemy.url = postgresql://user:password@
|
|
87
|
+
sqlalchemy.url = postgresql://user:password@127.0.0.1:5432/appdb
|
|
88
88
|
|
|
89
89
|
|
|
90
90
|
[post_write_hooks]
|
|
@@ -16,8 +16,8 @@ export class AppComponent {
|
|
|
16
16
|
result: number | null = null;
|
|
17
17
|
error: string | null = null;
|
|
18
18
|
|
|
19
|
-
// Configure via environment: defaults to
|
|
20
|
-
private apiUrl = 'http://
|
|
19
|
+
// Configure via environment: defaults to 127.0.0.1 for development
|
|
20
|
+
private apiUrl = 'http://127.0.0.1:8000';
|
|
21
21
|
|
|
22
22
|
private cdr = inject(ChangeDetectorRef);
|
|
23
23
|
|
|
@@ -30,7 +30,7 @@ describe('Home', () => {
|
|
|
30
30
|
fireEvent.click(button);
|
|
31
31
|
|
|
32
32
|
expect(fetch).toHaveBeenCalledTimes(1);
|
|
33
|
-
expect(fetch).toHaveBeenCalledWith('http://
|
|
33
|
+
expect(fetch).toHaveBeenCalledWith('http://127.0.0.1:8000/api/multiply', expect.any(Object));
|
|
34
34
|
|
|
35
35
|
const result = await waitFor(() => screen.getByText(/Result:/i));
|
|
36
36
|
expect(result).toBeInTheDocument();
|
|
@@ -11,7 +11,7 @@ export default function Home() {
|
|
|
11
11
|
const [result, setResult] = useState<number | null>(null);
|
|
12
12
|
const [error, setError] = useState<string | null>(null);
|
|
13
13
|
|
|
14
|
-
const apiUrl = process.env.NEXT_PUBLIC_API_URL || 'http://
|
|
14
|
+
const apiUrl = process.env.NEXT_PUBLIC_API_URL || 'http://127.0.0.1:8000';
|
|
15
15
|
|
|
16
16
|
const handleSubmit = async (e: FormEvent) => {
|
|
17
17
|
e.preventDefault();
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"devDependencies": {
|
|
16
16
|
"@testing-library/jest-dom": "^7.0.1",
|
|
17
17
|
"@testing-library/react": "^16.3.2",
|
|
18
|
-
"@testing-library/user-event": "^14.6.
|
|
18
|
+
"@testing-library/user-event": "^14.6.6",
|
|
19
19
|
"@types/jest": "^30.0.0",
|
|
20
20
|
"@types/node": "^26.2.0",
|
|
21
21
|
"@types/react": "^19.2.18",
|
|
@@ -2484,9 +2484,9 @@
|
|
|
2484
2484
|
}
|
|
2485
2485
|
},
|
|
2486
2486
|
"node_modules/@testing-library/user-event": {
|
|
2487
|
-
"version": "14.6.
|
|
2488
|
-
"resolved": "https://registry.npmjs.org/@testing-library/user-event/-/user-event-14.6.
|
|
2489
|
-
"integrity": "sha512-
|
|
2487
|
+
"version": "14.6.6",
|
|
2488
|
+
"resolved": "https://registry.npmjs.org/@testing-library/user-event/-/user-event-14.6.6.tgz",
|
|
2489
|
+
"integrity": "sha512-Jbs9FpkkIDw8FgSc6kOVsOv8JuuqGAL7J4X1oot77JxAoDlkNn2GRkd0aYRVuQ+pVQAiHWVkE4rX/dkF5fBiCw==",
|
|
2490
2490
|
"dev": true,
|
|
2491
2491
|
"license": "MIT",
|
|
2492
2492
|
"engines": {
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"devDependencies": {
|
|
18
18
|
"@testing-library/jest-dom": "^7.0.1",
|
|
19
19
|
"@testing-library/react": "^16.3.2",
|
|
20
|
-
"@testing-library/user-event": "^14.6.
|
|
20
|
+
"@testing-library/user-event": "^14.6.6",
|
|
21
21
|
"@types/jest": "^30.0.0",
|
|
22
22
|
"@types/node": "^26.2.0",
|
|
23
23
|
"@types/react": "^19.2.18",
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
let result: number | null = $state(null);
|
|
8
8
|
let error: string | null = $state(null);
|
|
9
9
|
|
|
10
|
-
const apiUrl = import.meta.env.VITE_API_URL || 'http://
|
|
10
|
+
const apiUrl = import.meta.env.VITE_API_URL || 'http://127.0.0.1:8000';
|
|
11
11
|
|
|
12
12
|
async function handleSubmit(e: Event) {
|
|
13
13
|
e.preventDefault();
|
|
@@ -9,7 +9,7 @@ const number = ref<string>('')
|
|
|
9
9
|
const result = ref<number | null>(null)
|
|
10
10
|
const error = ref<string | null>(null)
|
|
11
11
|
|
|
12
|
-
const apiUrl = import.meta.env.VITE_API_URL || 'http://
|
|
12
|
+
const apiUrl = import.meta.env.VITE_API_URL || 'http://127.0.0.1:8000'
|
|
13
13
|
|
|
14
14
|
const handleSubmit = async () => {
|
|
15
15
|
error.value = null
|