UNPKG

serverless-spy

Version:

CDK-based library for writing elegant integration tests on AWS serverless architecture and an additional web console to monitor events in real time.

9 lines (8 loc) 351 B
import { promises as fsPromises } from "fs"; import { getSSOTokenFilepath } from "./getSSOTokenFilepath"; const { readFile } = fsPromises; export const getSSOTokenFromFile = async (id) => { const ssoTokenFilepath = getSSOTokenFilepath(id); const ssoTokenText = await readFile(ssoTokenFilepath, "utf8"); return JSON.parse(ssoTokenText); };