@xeno-js/core 0.1.6 → 0.1.7

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.d.cts CHANGED
@@ -1370,6 +1370,15 @@ interface MiddlewareConfig {
1370
1370
  * @link https://github.com/xeno-js/xeno-js
1371
1371
  */
1372
1372
  cors: boolean;
1373
+ /**
1374
+ * @description The exposeHeaders property is an array of strings that specifies the headers that should be exposed to the client. This property is used to configure the CORS middleware that is responsible for handling CORS requests and responses.
1375
+ *
1376
+ * @author Xeno
1377
+ * @version 1.0.0
1378
+ * @since 2025-09-30
1379
+ * @link https://github.com/xeno-js/xeno-js
1380
+ */
1381
+ withCredentials: boolean;
1373
1382
  }
1374
1383
  /**
1375
1384
  * @description
package/dist/index.d.ts CHANGED
@@ -1370,6 +1370,15 @@ interface MiddlewareConfig {
1370
1370
  * @link https://github.com/xeno-js/xeno-js
1371
1371
  */
1372
1372
  cors: boolean;
1373
+ /**
1374
+ * @description The exposeHeaders property is an array of strings that specifies the headers that should be exposed to the client. This property is used to configure the CORS middleware that is responsible for handling CORS requests and responses.
1375
+ *
1376
+ * @author Xeno
1377
+ * @version 1.0.0
1378
+ * @since 2025-09-30
1379
+ * @link https://github.com/xeno-js/xeno-js
1380
+ */
1381
+ withCredentials: boolean;
1373
1382
  }
1374
1383
  /**
1375
1384
  * @description
package/dist/index.js CHANGED
@@ -4313,9 +4313,7 @@ var middleware_module_exports = {};
4313
4313
  __export(middleware_module_exports, {
4314
4314
  MiddlewareModule: () => MiddlewareModule
4315
4315
  });
4316
- import {
4317
- Guards as Guards43
4318
- } from "@xeno-js/shared";
4316
+ import { Guards as Guards43 } from "@xeno-js/shared";
4319
4317
  var MiddlewareModule;
4320
4318
  var init_middleware_module = __esm({
4321
4319
  "src/infrastructure/modules/middleware.module.ts"() {
@@ -4364,8 +4362,7 @@ var init_middleware_module = __esm({
4364
4362
  )
4365
4363
  );
4366
4364
  if (!Guards43.isNullOrEmpty(opts.allowOrigins)) {
4367
- const withCredentials2 = opts.httpConfig.withCredentials ?? false;
4368
- if (withCredentials2 && opts.allowOrigins.includes("*"))
4365
+ if (opts.withCredentials && opts.allowOrigins.includes("*"))
4369
4366
  throw new Error(
4370
4367
  "Wildcard CORS origin is not allowed when withCredentials is set to true in addHttpCore"
4371
4368
  );
@@ -4383,7 +4380,7 @@ var init_middleware_module = __esm({
4383
4380
  });
4384
4381
  middlewares.push(TOKENS4.ALLOW_ORIGIN_MIDDLEWARE);
4385
4382
  }
4386
- const withCredentials = Guards43.isDefined(opts.httpConfig.withCredentials) && opts.httpConfig.withCredentials ? "true" : "false";
4383
+ const withCredentials = opts.withCredentials ? "true" : "false";
4387
4384
  if (opts.optionsMiddleware) {
4388
4385
  const { OptionsMiddleware: OptionsMiddleware2 } = await Promise.resolve().then(() => (init_presentation(), presentation_exports));
4389
4386
  container.addSingleton(
@@ -4865,7 +4862,8 @@ var AppBuilder = class {
4865
4862
  trustedProxies: [],
4866
4863
  allowOrigins: [],
4867
4864
  allowHeaders: [],
4868
- cors: true
4865
+ cors: true,
4866
+ withCredentials: true
4869
4867
  };
4870
4868
  _httpConfig = {
4871
4869
  dataSourceToken: void 0,
@@ -5278,8 +5276,7 @@ var AppBuilder = class {
5278
5276
  ...this._middlewareConfig,
5279
5277
  isAuth: this._isAuthModuleQueued,
5280
5278
  isLogger: this._isLoggerModuleQueued,
5281
- isCache: this._isCacheModuleQueued || this._isPipelineModuleQueued,
5282
- httpConfig: this._httpConfig.http.client
5279
+ isCache: this._isCacheModuleQueued || this._isPipelineModuleQueued
5283
5280
  });
5284
5281
  }
5285
5282
  });