@tstdl/base 0.93.18 → 0.93.19
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.
|
@@ -630,7 +630,7 @@ AuthenticationService = AuthenticationService_1 = __decorate([
|
|
|
630
630
|
Singleton({
|
|
631
631
|
providers: [
|
|
632
632
|
provide(EntityRepositoryConfig, { useValue: { schema: 'authentication' } }),
|
|
633
|
-
|
|
633
|
+
provide(DatabaseConfig, { useFactory: (_, context) => context.resolve(AuthenticationModuleConfig).database ?? context.resolve(DatabaseConfig, undefined, { skipSelf: true }) }),
|
|
634
634
|
],
|
|
635
635
|
})
|
|
636
636
|
], AuthenticationService);
|
package/injector/injector.js
CHANGED
|
@@ -152,7 +152,7 @@ export class Injector {
|
|
|
152
152
|
}
|
|
153
153
|
}
|
|
154
154
|
if (options?.onlySelf != true) {
|
|
155
|
-
return this.#parent?.tryGetRegistration(token);
|
|
155
|
+
return this.#parent?.tryGetRegistration(token, { ...options, skipSelf: false });
|
|
156
156
|
}
|
|
157
157
|
return undefined;
|
|
158
158
|
}
|
|
@@ -280,14 +280,11 @@ export class Injector {
|
|
|
280
280
|
if (isUndefined(token)) {
|
|
281
281
|
throw new ResolveError('Token is undefined. This might be due to a circular dependency. Consider using an alias or forwardRef.', chain);
|
|
282
282
|
}
|
|
283
|
-
const registration =
|
|
283
|
+
const registration = this.tryGetRegistration(token, options);
|
|
284
284
|
if (isDefined(registration)) {
|
|
285
285
|
const singleRegistration = isArray(registration) ? registration[0] : registration;
|
|
286
286
|
return this._resolveRegistration(singleRegistration, argument, options, context, chain);
|
|
287
287
|
}
|
|
288
|
-
if (isNotNull(this.#parent) && (options.onlySelf != true)) {
|
|
289
|
-
return this.#parent._resolve(token, argument, { ...options, skipSelf: false }, context, chain);
|
|
290
|
-
}
|
|
291
288
|
if (options.optional == true) {
|
|
292
289
|
return undefined;
|
|
293
290
|
}
|
|
@@ -305,18 +302,24 @@ export class Injector {
|
|
|
305
302
|
if (isUndefined(token)) {
|
|
306
303
|
throw new ResolveError('Token is undefined. This might be due to a circular dependency. Consider using an alias or forwardRef.', chain);
|
|
307
304
|
}
|
|
308
|
-
const
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
305
|
+
const ownValues = [];
|
|
306
|
+
const parentValues = [];
|
|
307
|
+
if (options.skipSelf != true) {
|
|
308
|
+
const registration = this.tryGetRegistration(token, { onlySelf: true });
|
|
309
|
+
if (isDefined(registration)) {
|
|
310
|
+
const registrations = isArray(registration) ? registration : [registration];
|
|
311
|
+
const resolved = registrations.map((reg) => this._resolveRegistration(reg, argument, options, context, chain));
|
|
312
|
+
ownValues.push(...resolved);
|
|
313
|
+
}
|
|
312
314
|
}
|
|
313
315
|
if (isNotNull(this.#parent) && (options.onlySelf != true)) {
|
|
314
|
-
|
|
316
|
+
parentValues.push(...this.#parent._resolveAll(token, argument, { ...options, skipSelf: false }, context, chain));
|
|
315
317
|
}
|
|
316
|
-
|
|
317
|
-
|
|
318
|
+
const allValues = [...ownValues, ...parentValues];
|
|
319
|
+
if ((allValues.length == 0) && (options.optional != true)) {
|
|
320
|
+
throw new ResolveError(`No provider for ${getTokenName(token)} registered.`, chain);
|
|
318
321
|
}
|
|
319
|
-
|
|
322
|
+
return allValues;
|
|
320
323
|
}
|
|
321
324
|
_resolveRegistration(registration, argument, options, context, chain) {
|
|
322
325
|
checkOverflow(chain, context);
|
package/mail/module.js
CHANGED
|
@@ -31,6 +31,6 @@ export async function migrateMailSchema() {
|
|
|
31
31
|
await migrate(database, {
|
|
32
32
|
migrationsSchema: 'mail',
|
|
33
33
|
migrationsTable: '_migrations',
|
|
34
|
-
migrationsFolder: import.meta.resolve('./drizzle').replace('file://', '')
|
|
34
|
+
migrationsFolder: import.meta.resolve('./drizzle').replace('file://', ''),
|
|
35
35
|
});
|
|
36
36
|
}
|