diff --git a/schema/staticwebapp.config.json b/schema/staticwebapp.config.json index 43448e9f..38ef41e7 100644 --- a/schema/staticwebapp.config.json +++ b/schema/staticwebapp.config.json @@ -594,6 +594,7 @@ "node:14", "node:16", "node:18", + "node:20", "python:3.8", "python:3.9", "python:3.10" diff --git a/src/msha/auth/index.ts b/src/msha/auth/index.ts index 198a11f4..ddc0c812 100644 --- a/src/msha/auth/index.ts +++ b/src/msha/auth/index.ts @@ -54,7 +54,7 @@ function getAuthPaths(isCustomAuth: boolean): Path[] { route: /^\/\.auth\/purge\/(?aad|github|twitter|google|facebook|[a-z]+)(\?.*)?$/i, // locally, all purge requests are processed as logout requests function: "auth-logout", - } + }, ); return paths; @@ -62,7 +62,7 @@ function getAuthPaths(isCustomAuth: boolean): Path[] { async function routeMatcher( url = "/", - customAuth: SWAConfigFileAuth | undefined + customAuth: SWAConfigFileAuth | undefined, ): Promise<{ func: Function | undefined; bindingData: undefined | { provider: string } }> { const authPaths = getAuthPaths(!!customAuth); for (let index = 0; index < authPaths.length; index++) { @@ -76,7 +76,7 @@ async function routeMatcher( }; } - const func = (await import(`./routes/${path.function}`)).default as Function; + const func = (await import(`./routes/${path.function}.js`)).default as Function; return { func, bindingData }; } }