@mercurjs/dashboard-sdk 2.0.0-canary.61 → 2.0.0-canary.63

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/dist/index.cjs CHANGED
@@ -509,8 +509,8 @@ function isPageFile(file) {
509
509
  return basename === "page";
510
510
  }
511
511
  var UI_MODULE_KEYS = [
512
- "@mercurjs/core-plugin/modules/admin-ui",
513
- "@mercurjs/core-plugin/modules/vendor-ui"
512
+ "admin_ui",
513
+ "vendor_ui"
514
514
  ];
515
515
  async function loadMedusaConfig(medusaConfigPath, root) {
516
516
  try {
@@ -523,14 +523,13 @@ async function loadMedusaConfig(medusaConfigPath, root) {
523
523
  const appDir = import_path5.default.resolve(import_path5.default.dirname(medusaConfigPath), value.options.appDir);
524
524
  if (appDir === root) {
525
525
  return {
526
- backendUrl: value.options.backendUrl ?? "http://localhost:9000",
527
526
  base: value.options.path
528
527
  };
529
528
  }
530
529
  }
531
- return { backendUrl: "http://localhost:9000" };
530
+ return {};
532
531
  } catch {
533
- return { backendUrl: "http://localhost:9000" };
532
+ return {};
534
533
  }
535
534
  }
536
535
  function mercurDashboardPlugin(pluginConfig) {
@@ -541,8 +540,9 @@ function mercurDashboardPlugin(pluginConfig) {
541
540
  async config(viteConfig) {
542
541
  root = viteConfig.root || process.cwd();
543
542
  const medusaConfigPath = import_path5.default.resolve(root, pluginConfig.medusaConfigPath);
544
- const { backendUrl, base } = await loadMedusaConfig(medusaConfigPath, root);
543
+ const { base } = await loadMedusaConfig(medusaConfigPath, root);
545
544
  const srcDir = import_path5.default.join(root, "src");
545
+ const backendUrl = pluginConfig.backendUrl ?? "http://localhost:9000";
546
546
  config = {
547
547
  ...pluginConfig,
548
548
  backendUrl,
package/dist/index.d.cts CHANGED
@@ -3,6 +3,7 @@ import { ComponentType } from 'react';
3
3
 
4
4
  interface MercurConfig {
5
5
  medusaConfigPath: string;
6
+ backendUrl?: string;
6
7
  name?: string;
7
8
  logo?: string;
8
9
  components?: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mercurjs/dashboard-sdk",
3
- "version": "2.0.0-canary.61",
3
+ "version": "2.0.0-canary.63",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/mercurjs/mercur",