create-meridian-app 0.1.29 → 0.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.
Files changed (2) hide show
  1. package/dist/cli.js +22 -2
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -239,7 +239,17 @@ async function runDev() {
239
239
  const apiUrl = process.env.API_URL ?? `http://localhost:${apiPort}`;
240
240
  let dashServer = null;
241
241
  if (hasDashboard) {
242
- dashServer = await startDashboardServer(dashboardDist, dashboardPort, apiPort, "localhost", null, apiUrl);
242
+ let adminExtensionsBuf = null;
243
+ const extensionsEntry = path2.join(rootDir, "src", "admin", "widgets", "index.tsx");
244
+ if (existsSync2(extensionsEntry)) {
245
+ try {
246
+ adminExtensionsBuf = await buildAdminExtensions(rootDir);
247
+ console.log(chalk2.green(" \u2714 Admin extensions compiled"));
248
+ } catch (err) {
249
+ console.warn(chalk2.yellow(" \u26A0 Admin extensions failed to compile:"), err);
250
+ }
251
+ }
252
+ dashServer = await startDashboardServer(dashboardDist, dashboardPort, apiPort, "localhost", adminExtensionsBuf, apiUrl);
243
253
  console.log(
244
254
  chalk2.dim(" \u2192 API: ") + chalk2.cyan(`http://localhost:${apiPort}`) + chalk2.dim(" dashboard: ") + chalk2.cyan(`http://localhost:${dashboardPort}`)
245
255
  );
@@ -298,7 +308,17 @@ async function runStart() {
298
308
  const apiUrl = process.env.API_URL ?? `http://localhost:${apiPort}`;
299
309
  let dashServer = null;
300
310
  if (hasDashboard) {
301
- dashServer = await startDashboardServer(dashboardDist, dashboardPort, apiPort, "localhost", null, apiUrl);
311
+ let adminExtensionsBuf = null;
312
+ const extensionsEntry = path3.join(rootDir, "src", "admin", "widgets", "index.tsx");
313
+ if (existsSync3(extensionsEntry)) {
314
+ try {
315
+ adminExtensionsBuf = await buildAdminExtensions(rootDir);
316
+ console.log(chalk3.green(" \u2714 Admin extensions compiled"));
317
+ } catch (err) {
318
+ console.warn(chalk3.yellow(" \u26A0 Admin extensions failed to compile:"), err);
319
+ }
320
+ }
321
+ dashServer = await startDashboardServer(dashboardDist, dashboardPort, apiPort, "localhost", adminExtensionsBuf, apiUrl);
302
322
  console.log(
303
323
  chalk3.dim(" \u2192 API: ") + chalk3.cyan(`http://localhost:${apiPort}`) + chalk3.dim(" dashboard: ") + chalk3.cyan(`http://localhost:${dashboardPort}`)
304
324
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-meridian-app",
3
- "version": "0.1.29",
3
+ "version": "0.1.31",
4
4
  "description": "Create a new Meridian project or manage an existing one",
5
5
  "main": "./dist/index.js",
6
6
  "type": "module",