import type { NormalizedPreferences } from "../preferences"; // Only these Raycast services are used by the shared Node project code. export const environment = { assetsPath: "", supportPath: "" }; let preferences: NormalizedPreferences; export function getPreferenceValues(): T { return preferences as T; } const tokenStore = new Map(); export const LocalStorage = { async getItem(key: string) { return tokenStore.get(key) as T | undefined; }, async setItem(key: string, value: string) { tokenStore.set(key, value); }, async removeItem(key: string) { tokenStore.delete(key); }, }; export function configureWorker(config: { assets: string; support: string; preferences: NormalizedPreferences }) { environment.assetsPath = config.assets; environment.supportPath = config.support; preferences = config.preferences; }