@pacaf/wizard-ux 3.0.3 → 3.0.5

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": "@pacaf/wizard-ux",
3
- "version": "3.0.3",
3
+ "version": "3.0.5",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "Browser-based setup wizard for Power Apps Code Apps (parallel to @pacaf/wizard CLI).",
package/server/index.mjs CHANGED
@@ -17,7 +17,11 @@ import onepasswordRoutes from './routes/onepassword.mjs';
17
17
 
18
18
  const __dirname = dirname(fileURLToPath(import.meta.url));
19
19
  const UX_DIR = resolve(__dirname, '..');
20
- const ROOT_DIR = resolve(UX_DIR, '..');
20
+ // ROOT_DIR must be the user's project directory (where .wizard-state.json is written
21
+ // and from which pac/npm commands run). Under `npx`, __dirname resolves into the npx
22
+ // cache — using it as the working directory would share state across all projects on
23
+ // the machine. process.cwd() is always the directory the user launched the wizard from.
24
+ const ROOT_DIR = process.cwd();
21
25
 
22
26
  const HOST = '127.0.0.1';
23
27
  const PORT = Number(process.env.WIZARD_UX_PORT || 5174);
@@ -307,6 +307,10 @@ export default {
307
307
  }
308
308
  }
309
309
 
310
+ // Sort solutions A→Z by display name (case-insensitive) so the list is
311
+ // predictable regardless of creation order or environment size. Closes #30.
312
+ solutions.sort((a, b) => a.label.localeCompare(b.label, undefined, { sensitivity: 'base' }));
313
+
310
314
  const makerLink = getMakerPortalLink();
311
315
 
312
316
  const defaultSelection = state.SOLUTION_ID && solutions.some((s) => s.value === state.SOLUTION_ID)