feat: 기능 추가 과정중

This commit is contained in:
donghyeon-ka
2026-07-30 15:58:20 +09:00
parent d3ef801fe6
commit 6c52cdb916
648 changed files with 126325 additions and 6680 deletions
@@ -0,0 +1,6 @@
export function createOwnedBrowserStorageCapabilities() {
return {
local: localStorage,
session: sessionStorage,
};
}
@@ -0,0 +1,6 @@
export function createOwnedCrossContextCapabilities() {
return {
channel: new BroadcastChannel("owned-cross-context-fixture"),
storage: localStorage,
};
}
@@ -0,0 +1,17 @@
import type { BrowserStoragePolicy } from "../../../../src/application/ports/browser-file-storage/shared.ts";
export const POLICY: BrowserStoragePolicy = {
owner: "fixture-owner",
namespace: "fixture",
classification: "INTERNAL",
authority: "RECONSTRUCTABLE",
accountScope: "OPAQUE_PARTITION",
retention: { kind: "TTL", maxAgeMs: 1_000 },
softBudgetBytes: 1_000,
hardBudgetBytes: 2_000,
evictionPriority: "RECONSTRUCTABLE",
logoutAction: "EXPORT_THEN_PURGE",
accountDeletionAction: "PURGE_PARTITION",
pressureAction: "RETAIN",
unavailableFallback: "ONLINE_ONLY",
};
@@ -0,0 +1,4 @@
export function bypassThroughAlias() {
const browser = globalThis;
return browser.indexedDB.open("forbidden");
}
@@ -0,0 +1,5 @@
class BrowserRootHolder {
readonly root = globalThis;
}
new BrowserRootHolder().root.indexedDB.open("forbidden");
@@ -0,0 +1,4 @@
export function bypassThroughComputedAlias() {
const browser = globalThis;
return browser["caches"].open("forbidden");
}
@@ -0,0 +1,5 @@
class BrowserRootBox {
constructor(readonly root: typeof globalThis) {}
}
new BrowserRootBox(globalThis).root.indexedDB.open("forbidden");
@@ -0,0 +1,3 @@
export function bypassThroughDefault(browser = globalThis) {
return browser.indexedDB.open("forbidden");
}
@@ -0,0 +1,3 @@
export function constructBlobOutsideOwnedAdapter() {
return new Blob(["forbidden"]);
}
@@ -0,0 +1,3 @@
export function openBroadcastChannelDirectly() {
return new BroadcastChannel("forbidden");
}
@@ -0,0 +1,3 @@
export function openCacheDirectly() {
return caches.open("forbidden");
}
@@ -0,0 +1,3 @@
export function openDatabaseDirectly() {
return indexedDB.open("forbidden");
}
@@ -0,0 +1,3 @@
export function writeLocalStorageDirectly() {
localStorage.setItem("forbidden", "value");
}
@@ -0,0 +1,3 @@
export function openOpfsDirectly() {
return navigator.storage.getDirectory();
}
@@ -0,0 +1,3 @@
export function writeSessionStorageDirectly() {
sessionStorage.setItem("forbidden", "value");
}
@@ -0,0 +1,5 @@
export function bypassThroughDynamicCapabilityKey() {
const browser = globalThis;
const capability = "indexedDB";
return browser[capability].open("forbidden");
}
@@ -0,0 +1,4 @@
export function bypassThroughObjectContainer() {
const holder = { browser: globalThis };
return holder.browser.indexedDB.open("forbidden");
}
@@ -0,0 +1,3 @@
export function bypassThroughGlobalThis() {
return globalThis.indexedDB.open("forbidden");
}
@@ -0,0 +1,7 @@
function identity<Value>(value: Value): Value {
return value;
}
export function bypassThroughIdentityWrapper() {
return identity(globalThis).indexedDB.open("forbidden");
}
@@ -0,0 +1,4 @@
const holder: { root?: typeof globalThis } = {};
holder.root = globalThis;
holder.root.indexedDB.open("forbidden");
@@ -0,0 +1,3 @@
export function allocateObjectUrlDirectly(value: never) {
return URL.createObjectURL(value);
}
@@ -0,0 +1,7 @@
export function bypassThroughPropertyDescriptor() {
const descriptor = Object.getOwnPropertyDescriptor(
globalThis,
"indexedDB",
);
return (descriptor?.value as IDBFactory).open("forbidden");
}
@@ -0,0 +1,3 @@
export function bypassThroughReflection() {
return Reflect.get(globalThis, "indexedDB");
}