@xeno-js/core 0.1.11 → 0.1.12

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
@@ -1604,6 +1604,7 @@ type XenoRegistry<TSchema extends Dictionary = Dictionary, TExtensions = object>
1604
1604
  declare class AppBuilder<TRegistry extends XenoRegistry = XenoRegistry> {
1605
1605
  private readonly _container;
1606
1606
  private readonly _configuration;
1607
+ private _isBuilded;
1607
1608
  constructor(container?: IServiceContainer<TRegistry>);
1608
1609
  private readonly _modules;
1609
1610
  private _pipelineConfig;
package/dist/index.d.ts CHANGED
@@ -1604,6 +1604,7 @@ type XenoRegistry<TSchema extends Dictionary = Dictionary, TExtensions = object>
1604
1604
  declare class AppBuilder<TRegistry extends XenoRegistry = XenoRegistry> {
1605
1605
  private readonly _container;
1606
1606
  private readonly _configuration;
1607
+ private _isBuilded;
1607
1608
  constructor(container?: IServiceContainer<TRegistry>);
1608
1609
  private readonly _modules;
1609
1610
  private _pipelineConfig;
package/dist/index.js CHANGED
@@ -2435,9 +2435,7 @@ var init_cockatiel_resilience_factory = __esm({
2435
2435
  }
2436
2436
  }
2437
2437
  if (isNetworkError) return true;
2438
- if (Guards31.isDefined(status)) {
2439
- return status === 408 || status === 429 || status >= 500 && status < 600;
2440
- }
2438
+ if (Guards31.isDefined(status)) return status === 408 || status >= 500 && status < 600;
2441
2439
  return false;
2442
2440
  }
2443
2441
  isTransientAndIdempotent(error) {
@@ -3345,8 +3343,8 @@ var init_cqrs_module = __esm({
3345
3343
  );
3346
3344
  if (Guards46.isDefined(validationPipelines)) pipelines.push(validationPipelines);
3347
3345
  }
3348
- const commandPipelines = pipelines;
3349
- const queryPipelines = pipelines;
3346
+ const commandPipelines = [...pipelines];
3347
+ const queryPipelines = [...pipelines];
3350
3348
  if (Guards46.isDefined(opts.commandBus.idempotency) || Guards46.isDefined(opts.commandBus.concurrency)) {
3351
3349
  const { PipelineUtils: PipelineUtils2 } = await Promise.resolve().then(() => (init_pipeline_utils(), pipeline_utils_exports));
3352
3350
  const newCommandPipelines = await PipelineUtils2.addCommand(container, opts.commandBus);
@@ -4651,6 +4649,7 @@ var isDisposable = Object.freeze({
4651
4649
  var AppBuilder = class {
4652
4650
  _container = new ServiceContainer();
4653
4651
  _configuration;
4652
+ _isBuilded = false;
4654
4653
  constructor(container) {
4655
4654
  this._container = container ?? new ServiceContainer();
4656
4655
  this._container.addSingleton(
@@ -5018,6 +5017,7 @@ var AppBuilder = class {
5018
5017
  * @link https://github.com/xeno-js/xeno-js
5019
5018
  */
5020
5019
  async build() {
5020
+ if (this._isBuilded) return this._container;
5021
5021
  console.info("\u2699\uFE0F Bootstrapping application modules...");
5022
5022
  const sortedModules = this._modules.sort((a, b) => a.priority - b.priority);
5023
5023
  for (const queued of sortedModules) {
@@ -5038,6 +5038,7 @@ var AppBuilder = class {
5038
5038
  }
5039
5039
  }
5040
5040
  console.info("\u2705 Application modules bootstrapped successfully.");
5041
+ this._isBuilded = true;
5041
5042
  return this._container;
5042
5043
  }
5043
5044
  // ─────────────────────────────────────────────────────────────────────────────