Files
NapCatQQ/.pnpm-store/v3/files/67/b1138f6f93680b41a658a636cebc213a322f01c9c52facee0512cde8296cd76be6975fea635f934f0b3aa8f1b29f8b5836549301763c705c177813230bf5db
T
TanTan e311ca3275
Build NapCat Artifacts / Windows Loader Test (push) Canceled after 0s
Build NapCat Artifacts / Type Check & Test (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Framework (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Shell (push) Canceled after 0s
docs: 仓库链接指向本镜像仓库
2026-11-13 09:25:58 +08:00

35 lines
1.5 KiB
Plaintext

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.resolveBindingsDeactivations = resolveBindingsDeactivations;
const isScopedBinding_1 = require("../../binding/calculations/isScopedBinding");
const BindingScope_1 = require("../../binding/models/BindingScope");
const resolveBindingDeactivations_1 = require("./resolveBindingDeactivations");
const CACHE_KEY_TYPE = 'cache';
function resolveBindingsDeactivations(params, bindings) {
if (bindings === undefined) {
return;
}
const singletonScopedBindings = filterCachedSinglentonScopedBindings(bindings);
const deactivationPromiseResults = [];
for (const binding of singletonScopedBindings) {
const deactivationResult = (0, resolveBindingDeactivations_1.resolveBindingDeactivations)(params, binding);
if (deactivationResult !== undefined) {
deactivationPromiseResults.push(deactivationResult);
}
}
if (deactivationPromiseResults.length > 0) {
return Promise.all(deactivationPromiseResults).then(() => undefined);
}
}
function filterCachedSinglentonScopedBindings(bindings) {
const filteredBindings = [];
for (const binding of bindings) {
if ((0, isScopedBinding_1.isScopedBinding)(binding) &&
binding.scope === BindingScope_1.bindingScopeValues.Singleton &&
binding.cache.isRight) {
filteredBindings.push(binding);
}
}
return filteredBindings;
}
//# sourceMappingURL=resolveBindingsDeactivations.js.map