feat(core): Add OIDC support for SSO (#15988)

Co-authored-by: Andreas Fitzek <andreas.fitzek@n8n.io>
This commit is contained in:
Ricardo Espinoza
2025-06-13 10:18:14 -04:00
committed by GitHub
parent 0d5ac1f822
commit 30148df7f3
40 changed files with 1358 additions and 197 deletions

View File

@@ -13,6 +13,17 @@ const tsJestOptions = {
const isCoverageEnabled = process.env.COVERAGE_ENABLED === 'true';
const esmDependencies = [
'pdfjs-dist',
'openid-client',
'oauth4webapi',
'jose',
// Add other ESM dependencies that need to be transformed here
];
const esmDependenciesPattern = esmDependencies.join('|');
const esmDependenciesRegex = `node_modules/(${esmDependenciesPattern})/.+\\.m?js$`;
/** @type {import('jest').Config} */
const config = {
verbose: true,
@@ -21,7 +32,7 @@ const config = {
testPathIgnorePatterns: ['/dist/', '/node_modules/'],
transform: {
'^.+\\.ts$': ['ts-jest', tsJestOptions],
'node_modules/pdfjs-dist/.+\\.mjs$': [
[esmDependenciesRegex]: [
'babel-jest',
{
presets: ['@babel/preset-env'],
@@ -29,7 +40,7 @@ const config = {
},
],
},
transformIgnorePatterns: ['/dist/', '/node_modules/(?!.*pdfjs-dist/)'],
transformIgnorePatterns: [`/node_modules/(?!${esmDependenciesPattern})/`],
// This resolve the path mappings from the tsconfig relative to each jest.config.js
moduleNameMapper: compilerOptions?.paths
? pathsToModuleNameMapper(compilerOptions.paths, {