1
0
mirror of https://github.com/pocket-id/pocket-id.git synced 2026-02-14 19:57:31 +00:00

feat: add CLI command for importing and exporting Pocket ID data (#998)

Co-authored-by: Alessandro (Ale) Segala <43508+ItalyPaleAle@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Elias Schneider
2025-11-26 10:38:15 +01:00
parent f0144584af
commit 3420a00073
56 changed files with 3178 additions and 643 deletions

View File

@@ -1,9 +1,9 @@
import playwrightConfig from '../playwright.config';
export async function cleanupBackend(skipSeed = false) {
export async function cleanupBackend({ skipSeed = false, skipLdapSetup = false } = {}) {
const url = new URL('/api/test/reset', playwrightConfig.use!.baseURL);
if (process.env.SKIP_LDAP_TESTS === 'true' || skipSeed) {
if (process.env.SKIP_LDAP_TESTS === 'true' || skipSeed || skipLdapSetup) {
url.searchParams.append('skip-ldap', 'true');
}

7
tests/utils/fs.util.ts Normal file
View File

@@ -0,0 +1,7 @@
import path from 'path';
export const tmpDir = pathFromRoot('.tmp');
export function pathFromRoot(p: string): string {
return path.resolve(path.dirname(new URL(import.meta.url).pathname), '..', p);
}