@xeno-js/core 0.1.11 → 0.1.13
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/README.md +43 -23
- package/dist/index.cjs +7 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +7 -6
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
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);
|
|
@@ -3922,7 +3920,7 @@ var init_rate_limiter_middleware = __esm({
|
|
|
3922
3920
|
error: {
|
|
3923
3921
|
code: ERROR_CODES7.TOO_MANY_REQUESTS,
|
|
3924
3922
|
message: ERROR_CODE_MESSAGES6[ERROR_CODES7.TOO_MANY_REQUESTS],
|
|
3925
|
-
details: `Rate limit exceeded
|
|
3923
|
+
details: `Rate limit exceeded.`,
|
|
3926
3924
|
path: req.path
|
|
3927
3925
|
},
|
|
3928
3926
|
correlationId: tracing?.correlationId ?? GuidHelper10.generate(),
|
|
@@ -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
|
// ─────────────────────────────────────────────────────────────────────────────
|