@plyaz/core 1.8.3 → 1.8.4

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.
@@ -6204,7 +6204,7 @@ var FrontendExampleDomainService = class _FrontendExampleDomainService extends B
6204
6204
  // Constructor
6205
6205
  // ─────────────────────────────────────────────────────────────────────────
6206
6206
  constructor(config = {}, options) {
6207
- const apiBasePath = config.apiBasePath ?? "/api/examples";
6207
+ const apiBasePath = config.apiBasePath || "/api/examples";
6208
6208
  super({
6209
6209
  serviceName: "ExampleFrontendService",
6210
6210
  supportedRuntimes: ["frontend"],
@@ -6308,7 +6308,11 @@ var FrontendExampleDomainService = class _FrontendExampleDomainService extends B
6308
6308
  static async create(config, options) {
6309
6309
  const mergedConfig = {
6310
6310
  ...config,
6311
- apiBasePath: config.apiBasePath ?? options?.apiClient?.options?.baseURL ?? "/api/examples"
6311
+ // Use || instead of ?? because api.baseURL may be '' (empty string) for same-origin requests.
6312
+ // The ?? operator only falls through on null/undefined, not empty strings.
6313
+ // An empty string is not a valid API path, so we treat it as "not provided" and fall through to default.
6314
+ // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
6315
+ apiBasePath: config.apiBasePath || options?.apiClient?.options?.baseURL || "/api/examples"
6312
6316
  };
6313
6317
  const service = new _FrontendExampleDomainService(mergedConfig, options);
6314
6318
  if (mergedConfig.autoFetch) {
@@ -7617,7 +7621,10 @@ var FrontendFeatureFlagDomainService = class _FrontendFeatureFlagDomainService e
7617
7621
  }
7618
7622
  /** Build API client for feature flags */
7619
7623
  static async buildApiClient(config, options) {
7620
- const apiBasePath = config.apiBasePath ?? options?.apiClient?.options?.baseURL ?? "/feature-flags";
7624
+ const apiBasePath = (
7625
+ // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
7626
+ config.apiBasePath || options?.apiClient?.options?.baseURL || "/feature-flags"
7627
+ );
7621
7628
  return createApiClient({ ...options?.apiClient?.options, baseURL: apiBasePath });
7622
7629
  }
7623
7630
  /** Build feature flag provider */