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) 327 B
import { createHash } from "crypto"; import { join } from "path"; import { getHomeDir } from "./getHomeDir"; export const getSSOTokenFilepath = (id) => { const hasher = createHash("sha1"); const cacheName = hasher.update(id).digest("hex"); return join(getHomeDir(), ".aws", "sso", "cache", `${cacheName}.json`); };