@haskou/ddd-kernel 3.0.0 → 3.0.1
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/{RetryPredicate-cPJPlGbJ.d.cts → RetryPredicate-BKlKFvI4.d.cts} +1 -1
- package/dist/{RetryPredicate-Cch9NXV3.d.ts → RetryPredicate-DG6jcGCX.d.ts} +1 -1
- package/dist/{ServiceClass-Bj3G71L8.d.ts → ServiceClass-C-ZCUQWE.d.ts} +1 -1
- package/dist/{ServiceClass-nnDgfgdL.d.cts → ServiceClass-U0Vk46dN.d.cts} +1 -1
- package/dist/{ShutdownHook-Cx1Rc40s.d.ts → ShutdownHook-BCQgEMUI.d.ts} +1 -1
- package/dist/{ShutdownHook-Ho-CeLu8.d.cts → ShutdownHook-CCtg4Ypg.d.cts} +1 -1
- package/dist/adapters/index.cjs +22 -6
- package/dist/adapters/index.cjs.map +1 -1
- package/dist/adapters/index.d.cts +3 -3
- package/dist/adapters/index.d.ts +3 -3
- package/dist/adapters/index.js +22 -6
- package/dist/adapters/index.js.map +1 -1
- package/dist/adapters/pubsub/amqp/index.cjs +22 -6
- package/dist/adapters/pubsub/amqp/index.cjs.map +1 -1
- package/dist/adapters/pubsub/amqp/index.js +22 -6
- package/dist/adapters/pubsub/amqp/index.js.map +1 -1
- package/dist/adapters/pubsub/index.cjs +22 -6
- package/dist/adapters/pubsub/index.cjs.map +1 -1
- package/dist/adapters/pubsub/index.d.cts +3 -3
- package/dist/adapters/pubsub/index.d.ts +3 -3
- package/dist/adapters/pubsub/index.js +22 -6
- package/dist/adapters/pubsub/index.js.map +1 -1
- package/dist/adapters/ui/express/index.d.cts +2 -2
- package/dist/adapters/ui/express/index.d.ts +2 -2
- package/dist/adapters/ui/index.cjs +22 -6
- package/dist/adapters/ui/index.cjs.map +1 -1
- package/dist/adapters/ui/index.d.cts +2 -2
- package/dist/adapters/ui/index.d.ts +2 -2
- package/dist/adapters/ui/index.js +22 -6
- package/dist/adapters/ui/index.js.map +1 -1
- package/dist/adapters/ui/routes/index.cjs +22 -6
- package/dist/adapters/ui/routes/index.cjs.map +1 -1
- package/dist/adapters/ui/routes/index.js +22 -6
- package/dist/adapters/ui/routes/index.js.map +1 -1
- package/dist/contracts/index.d.cts +3 -3
- package/dist/contracts/index.d.ts +3 -3
- package/dist/contracts/kernel/index.d.cts +3 -3
- package/dist/contracts/kernel/index.d.ts +3 -3
- package/dist/index.cjs +22 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +22 -6
- package/dist/index.js.map +1 -1
- package/dist/infrastructure/dependency-injection/index.cjs +22 -6
- package/dist/infrastructure/dependency-injection/index.cjs.map +1 -1
- package/dist/infrastructure/dependency-injection/index.d.cts +6 -2
- package/dist/infrastructure/dependency-injection/index.d.ts +6 -2
- package/dist/infrastructure/dependency-injection/index.js +22 -6
- package/dist/infrastructure/dependency-injection/index.js.map +1 -1
- package/dist/infrastructure/express/index.d.cts +2 -2
- package/dist/infrastructure/express/index.d.ts +2 -2
- package/dist/infrastructure/scheduler/index.cjs +22 -6
- package/dist/infrastructure/scheduler/index.cjs.map +1 -1
- package/dist/infrastructure/scheduler/index.js +22 -6
- package/dist/infrastructure/scheduler/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -31,7 +31,6 @@ interface DependencyInjectionOptions {
|
|
|
31
31
|
declare class DependencyInjection implements ServiceResolver {
|
|
32
32
|
private readonly options;
|
|
33
33
|
private static configuredInstance;
|
|
34
|
-
private autowire;
|
|
35
34
|
private loader;
|
|
36
35
|
private readonly container;
|
|
37
36
|
private readonly overrideTokenIds;
|
|
@@ -58,6 +57,7 @@ declare class DependencyInjection implements ServiceResolver {
|
|
|
58
57
|
private applyFactoryOverride;
|
|
59
58
|
private applyValueOverride;
|
|
60
59
|
private applyOverrides;
|
|
60
|
+
private trackAutowireAliasIds;
|
|
61
61
|
private processAutowire;
|
|
62
62
|
private registerParentAliases;
|
|
63
63
|
compile(): Promise<void>;
|
|
@@ -31,7 +31,6 @@ interface DependencyInjectionOptions {
|
|
|
31
31
|
declare class DependencyInjection implements ServiceResolver {
|
|
32
32
|
private readonly options;
|
|
33
33
|
private static configuredInstance;
|
|
34
|
-
private autowire;
|
|
35
34
|
private loader;
|
|
36
35
|
private readonly container;
|
|
37
36
|
private readonly overrideTokenIds;
|
|
@@ -58,6 +57,7 @@ declare class DependencyInjection implements ServiceResolver {
|
|
|
58
57
|
private applyFactoryOverride;
|
|
59
58
|
private applyValueOverride;
|
|
60
59
|
private applyOverrides;
|
|
60
|
+
private trackAutowireAliasIds;
|
|
61
61
|
private processAutowire;
|
|
62
62
|
private registerParentAliases;
|
|
63
63
|
compile(): Promise<void>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { D as DomainEvent } from './DomainEvent-C2OvBSCS.js';
|
|
2
2
|
import { DotenvConfigOutput } from 'dotenv';
|
|
3
|
-
import { b as DependencyOverride, D as DependencyInjection, S as ServiceClass } from './ServiceClass-
|
|
3
|
+
import { b as DependencyOverride, D as DependencyInjection, S as ServiceClass } from './ServiceClass-C-ZCUQWE.js';
|
|
4
4
|
import { Initializer, Runtime } from './infrastructure/lifecycle/index.js';
|
|
5
5
|
import { a as Scheduler } from './Scheduler-Cm24s3-v.js';
|
|
6
6
|
import { K as KernelLogger } from './KernelLogger-BESOFrpW.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { D as DomainEvent } from './DomainEvent-C2OvBSCS.cjs';
|
|
2
2
|
import { DotenvConfigOutput } from 'dotenv';
|
|
3
|
-
import { b as DependencyOverride, D as DependencyInjection, S as ServiceClass } from './ServiceClass-
|
|
3
|
+
import { b as DependencyOverride, D as DependencyInjection, S as ServiceClass } from './ServiceClass-U0Vk46dN.cjs';
|
|
4
4
|
import { Initializer, Runtime } from './infrastructure/lifecycle/index.cjs';
|
|
5
5
|
import { a as Scheduler } from './Scheduler-Cm24s3-v.cjs';
|
|
6
6
|
import { K as KernelLogger } from './KernelLogger-BESOFrpW.cjs';
|
package/dist/adapters/index.cjs
CHANGED
|
@@ -167,7 +167,6 @@ var DependencyInjection = class _DependencyInjection {
|
|
|
167
167
|
}
|
|
168
168
|
options;
|
|
169
169
|
static configuredInstance;
|
|
170
|
-
autowire;
|
|
171
170
|
loader;
|
|
172
171
|
container;
|
|
173
172
|
overrideTokenIds = /* @__PURE__ */ new Map();
|
|
@@ -335,14 +334,31 @@ var DependencyInjection = class _DependencyInjection {
|
|
|
335
334
|
this.applyValueOverride(override);
|
|
336
335
|
}
|
|
337
336
|
}
|
|
338
|
-
|
|
337
|
+
trackAutowireAliasIds(autowire) {
|
|
338
|
+
const internals = autowire;
|
|
339
|
+
const createLegacyServiceId = internals._getLegacyServiceId.bind(autowire);
|
|
340
|
+
const aliasIds = /* @__PURE__ */ new Set();
|
|
341
|
+
internals._getLegacyServiceId = async (...args) => {
|
|
342
|
+
const id = await createLegacyServiceId(...args);
|
|
343
|
+
if (!this.container.hasAlias(id) && !this.container.hasDefinition(id)) {
|
|
344
|
+
aliasIds.add(id);
|
|
345
|
+
}
|
|
346
|
+
return id;
|
|
347
|
+
};
|
|
348
|
+
return aliasIds;
|
|
349
|
+
}
|
|
350
|
+
async processAutowire(autowire) {
|
|
339
351
|
const previousLogger = this.container.logger;
|
|
352
|
+
const autowireAliasIds = this.trackAutowireAliasIds(autowire);
|
|
340
353
|
this.container.logger = new AutowireWarningFilter(previousLogger);
|
|
341
354
|
try {
|
|
342
|
-
await
|
|
355
|
+
await autowire.process();
|
|
343
356
|
} finally {
|
|
344
357
|
this.container.logger = previousLogger;
|
|
345
358
|
}
|
|
359
|
+
for (const id of autowireAliasIds) {
|
|
360
|
+
this.aliases.delete(id);
|
|
361
|
+
}
|
|
346
362
|
}
|
|
347
363
|
registerParentAliases() {
|
|
348
364
|
for (const [id, definition] of this.definitions.entries()) {
|
|
@@ -355,12 +371,12 @@ var DependencyInjection = class _DependencyInjection {
|
|
|
355
371
|
async compile() {
|
|
356
372
|
if (this.options.containerBuild) {
|
|
357
373
|
await this.ensureFolderExists(this.options.servicesYamlPath);
|
|
358
|
-
|
|
359
|
-
|
|
374
|
+
const autowire = new import_node_dependency_injection.Autowire(this.container);
|
|
375
|
+
autowire.serviceFile = new import_node_dependency_injection.ServiceFile(
|
|
360
376
|
this.options.servicesYamlPath,
|
|
361
377
|
false
|
|
362
378
|
);
|
|
363
|
-
await this.processAutowire();
|
|
379
|
+
await this.processAutowire(autowire);
|
|
364
380
|
} else {
|
|
365
381
|
this.loader = new import_node_dependency_injection.YamlFileLoader(this.container);
|
|
366
382
|
await this.loader.load(this.options.servicesYamlPath);
|