Replaced unnecessary function with inline code.
This commit is contained in:
@@ -166,10 +166,6 @@ export function parseResources(resourcesCsv) {
|
|||||||
return unique;
|
return unique;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getScopesForResources(resources) {
|
|
||||||
return resources.map((resourceName) => RESOURCE_SCOPE_BY_NAME[resourceName]);
|
|
||||||
}
|
|
||||||
|
|
||||||
function fileCachePlugin(cachePath) {
|
function fileCachePlugin(cachePath) {
|
||||||
return {
|
return {
|
||||||
beforeCacheAccess: async (ctx) => {
|
beforeCacheAccess: async (ctx) => {
|
||||||
@@ -328,7 +324,7 @@ export async function login({
|
|||||||
validateBrowserOptions({ browser, browserProfile });
|
validateBrowserOptions({ browser, browserProfile });
|
||||||
|
|
||||||
const resources = parseResources(resourcesCsv);
|
const resources = parseResources(resourcesCsv);
|
||||||
const scopes = getScopesForResources(resources);
|
const scopes = resources.map((resourceName) => RESOURCE_SCOPE_BY_NAME[resourceName]);
|
||||||
const pca = await createPca({ tenantId, clientId });
|
const pca = await createPca({ tenantId, clientId });
|
||||||
const session = await readSessionState();
|
const session = await readSessionState();
|
||||||
const preferredAccount = await findAccountByUpn({
|
const preferredAccount = await findAccountByUpn({
|
||||||
|
|||||||
Reference in New Issue
Block a user