Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
1 line
940 B
Plaintext
1 line
940 B
Plaintext
{"version":3,"file":"static.js","names":["token: string | null","access_token"],"sources":["../../src/auth/static.ts"],"sourcesContent":["import type { DirectusClient } from '../types/client.js';\nimport type { StaticTokenClient } from './types.js';\n\n/**\n * Creates a client to authenticate with Directus using a static token.\n *\n * @param token static token.\n *\n * @returns A Directus static token client.\n */\nexport const staticToken = (access_token: string) => {\n\treturn <Schema>(_client: DirectusClient<Schema>): StaticTokenClient<Schema> => {\n\t\tlet token: string | null = access_token ?? null;\n\t\treturn {\n\t\t\tasync getToken() {\n\t\t\t\treturn token;\n\t\t\t},\n\t\t\tasync setToken(access_token: string | null) {\n\t\t\t\ttoken = access_token;\n\t\t\t},\n\t\t};\n\t};\n};\n"],"mappings":"AAUA,MAAa,EAAe,GACX,GAA+D,CAC9E,IAAIA,EAAuB,GAAgB,KAC3C,MAAO,CACN,MAAM,UAAW,CAChB,OAAO,GAER,MAAM,SAAS,EAA6B,CAC3C,EAAQC,GAET"} |