2024-07-27 22:59:25 -05:00
|
|
|
import { createRequire } from 'node:module';
|
|
|
|
|
2023-02-21 08:24:43 -05:00
|
|
|
import { authedAdminTenantApi } from './lib/api/api.js';
|
|
|
|
|
2024-07-27 22:59:25 -05:00
|
|
|
// A patch for the global require function - see https://github.com/evanw/esbuild/issues/1921
|
|
|
|
// eslint-disable-next-line @silverhand/fp/no-mutation
|
|
|
|
globalThis.require = createRequire(import.meta.url);
|
|
|
|
|
2023-02-21 08:24:43 -05:00
|
|
|
// We need to update this before tests otherwise Logto will update SignInMode for admin tenant
|
|
|
|
// The update logic should be
|
|
|
|
await authedAdminTenantApi.patch('sign-in-exp', {
|
|
|
|
json: { signInMode: 'SignInAndRegister' },
|
|
|
|
});
|