everything-dev
Version:
A consolidated product package for building Module Federation apps with oRPC APIs.
1 lines • 1.45 kB
Source Map (JSON)
{"version":3,"file":"session-store.cjs","names":["Context","Layer","readSessionHandle","writeSessionHandle","deleteSessionHandle"],"sources":["../../../src/services/auth/session-store.ts"],"sourcesContent":["import { Context, Layer } from \"effect\";\nimport {\n deleteSessionHandle,\n nearCredentialsPath,\n readSessionHandle,\n removePublishedKeyFile,\n writeSessionHandle,\n} from \"./session\";\n\n/**\n * The `.bos/session.json` handle as a Context.Service tag (ticket #423): the\n * auth handlers yield the store instead of importing the session module\n * directly, keeping the login/logout flows swappable in tests.\n */\n\nexport class SessionStore extends Context.Service<\n SessionStore,\n {\n read: typeof readSessionHandle;\n write: typeof writeSessionHandle;\n delete: typeof deleteSessionHandle;\n removePublishedKeyFile: typeof removePublishedKeyFile;\n nearCredentialsPath: typeof nearCredentialsPath;\n }\n>()(\"everything-dev/auth/session-store\") {\n static readonly Live = Layer.succeed(\n this,\n SessionStore.of({\n read: readSessionHandle,\n write: writeSessionHandle,\n delete: deleteSessionHandle,\n removePublishedKeyFile,\n nearCredentialsPath,\n }),\n );\n}\n"],"mappings":";;;;;;;;;AAeA,IAAa,eAAb,MAAa,qBAAqBA,eAAQ,QASxC,CAAC,CAAC,mCAAmC,CAAC,CAAC;CACvC,OAAgB,OAAOC,aAAM,QAC3B,MACA,aAAa,GAAG;EACd,MAAMC;EACN,OAAOC;EACP,QAAQC;EACR;EACA;CACF,CAAC,CACH;AACF"}