fix(mcp): подготовить доступ и отзыв разрешений для приёмки

This commit is contained in:
Denozordec committed 2026-11-03 03:05:24 +07:00
commit ef7bb79d4e
311 files changed
+73119

No files matched your search

+30
View File
@@ -0,0 +1,30 @@
// Node ≥ 25 имеет собственный экспериментальный localStorage, который затеняет
// jsdom и без --localstorage-file не работает. Подставляем простую реализацию.
class MemoryStorage implements Storage {
private map = new Map<string, string>()
get length() {
return this.map.size
}
clear() {
this.map.clear()
}
getItem(key: string) {
return this.map.get(key) ?? null
}
key(index: number) {
return [...this.map.keys()][index] ?? null
}
removeItem(key: string) {
this.map.delete(key)
}
setItem(key: string, value: string) {
this.map.set(key, String(value))
}
}
if (typeof globalThis.localStorage?.clear !== 'function') {
Object.defineProperty(globalThis, 'localStorage', {
value: new MemoryStorage(),
configurable: true,
})
}