@mostajs/setup 2.1.30 → 2.1.31

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.
@@ -9,8 +9,9 @@ import { runInstall } from '../lib/setup.js';
9
9
  export function createInstallHandler(needsSetup, setupConfig) {
10
10
  async function POST(req) {
11
11
  const body = await req.json();
12
- // Skip needsSetup check if admin was already created (wizard creates admin before seed)
13
- if (!body.skipCheck && !(await needsSetup())) {
12
+ // In NET mode, skip needsSetup check the admin may already exist from dashboard seed
13
+ // or from a previous partial install. The wizard controls the flow.
14
+ if (body.mode !== 'net' && !body.skipCheck && !(await needsSetup())) {
14
15
  return Response.json({ ok: false, error: 'Installation deja effectuee' }, { status: 400 });
15
16
  }
16
17
  const result = await runInstall(body, setupConfig);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mostajs/setup",
3
- "version": "2.1.30",
3
+ "version": "2.1.31",
4
4
  "description": "Reusable setup wizard module — multi-dialect DB configuration, .env.local writer, seed runner",
5
5
  "author": "Dr Hamid MADANI <drmdh@msn.com>",
6
6
  "license": "MIT",