From 164a12599500bd2549f1190926d5fbf30e9f6fb2 Mon Sep 17 00:00:00 2001 From: Anton Shepilov Date: Mon, 22 Jan 2024 22:30:19 +0300 Subject: [PATCH] Last chance to success (#340) --- .../backend/utils/nextcloud-migration/src/express_server.ts | 2 +- .../utils/nextcloud-migration/src/{user => }/ldap_user.ts | 2 +- .../src/{user => }/lemon_ldap_user_provider.ts | 0 .../utils/nextcloud-migration/src/nextcloud_migration.ts | 4 ++-- .../nextcloud-migration/src/{user => }/shell_ldap_user.ts | 2 +- tdrive/backend/utils/nextcloud-migration/src/twake_client.ts | 2 +- .../utils/nextcloud-migration/src/{user => }/user_privider.ts | 0 .../backend/utils/nextcloud-migration/test/lemon.ldap.test.ts | 2 +- .../backend/utils/nextcloud-migration/test/shell.ldap.test.ts | 4 ++-- 9 files changed, 9 insertions(+), 9 deletions(-) rename tdrive/backend/utils/nextcloud-migration/src/{user => }/ldap_user.ts (98%) rename tdrive/backend/utils/nextcloud-migration/src/{user => }/lemon_ldap_user_provider.ts (100%) rename tdrive/backend/utils/nextcloud-migration/src/{user => }/shell_ldap_user.ts (97%) rename tdrive/backend/utils/nextcloud-migration/src/{user => }/user_privider.ts (100%) diff --git a/tdrive/backend/utils/nextcloud-migration/src/express_server.ts b/tdrive/backend/utils/nextcloud-migration/src/express_server.ts index 20e3c310..4c144cd2 100644 --- a/tdrive/backend/utils/nextcloud-migration/src/express_server.ts +++ b/tdrive/backend/utils/nextcloud-migration/src/express_server.ts @@ -1,7 +1,7 @@ import express, { Express, Request, Response } from "express"; import { NextcloudMigration, NextcloudMigrationConfiguration } from './nextcloud_migration'; import { logger } from "./logger" -import { UserProviderType } from "./user/user_privider"; +import { UserProviderType } from "./user_privider"; const app: Express = express(); const port = process.env.SERVER_PORT || 3000; diff --git a/tdrive/backend/utils/nextcloud-migration/src/user/ldap_user.ts b/tdrive/backend/utils/nextcloud-migration/src/ldap_user.ts similarity index 98% rename from tdrive/backend/utils/nextcloud-migration/src/user/ldap_user.ts rename to tdrive/backend/utils/nextcloud-migration/src/ldap_user.ts index e033d619..53c80b25 100644 --- a/tdrive/backend/utils/nextcloud-migration/src/user/ldap_user.ts +++ b/tdrive/backend/utils/nextcloud-migration/src/ldap_user.ts @@ -1,5 +1,5 @@ import ldap, { SearchOptions } from "ldapjs"; -import { logger } from "../logger"; +import { logger } from "./logger"; import { User, UserProvider } from "./user_privider"; export type LdapConfiguration = { diff --git a/tdrive/backend/utils/nextcloud-migration/src/user/lemon_ldap_user_provider.ts b/tdrive/backend/utils/nextcloud-migration/src/lemon_ldap_user_provider.ts similarity index 100% rename from tdrive/backend/utils/nextcloud-migration/src/user/lemon_ldap_user_provider.ts rename to tdrive/backend/utils/nextcloud-migration/src/lemon_ldap_user_provider.ts diff --git a/tdrive/backend/utils/nextcloud-migration/src/nextcloud_migration.ts b/tdrive/backend/utils/nextcloud-migration/src/nextcloud_migration.ts index e65f969e..7103bac2 100644 --- a/tdrive/backend/utils/nextcloud-migration/src/nextcloud_migration.ts +++ b/tdrive/backend/utils/nextcloud-migration/src/nextcloud_migration.ts @@ -1,11 +1,11 @@ import { exec } from 'child_process'; // @ts-ignore import fs from 'fs'; -import { ShellLdapUserProvider } from './user/shell_ldap_user'; +import { ShellLdapUserProvider } from './shell_ldap_user'; import { TwakeDriveClient, TwakeDriveUser } from './twake_client'; import path from 'path'; import { logger } from "./logger" -import { User, UserProvider, UserProviderFactory, UserProviderType } from "./user/user_privider"; +import { User, UserProvider, UserProviderFactory, UserProviderType } from "./user_privider"; export interface NextcloudMigrationConfiguration { shell: { diff --git a/tdrive/backend/utils/nextcloud-migration/src/user/shell_ldap_user.ts b/tdrive/backend/utils/nextcloud-migration/src/shell_ldap_user.ts similarity index 97% rename from tdrive/backend/utils/nextcloud-migration/src/user/shell_ldap_user.ts rename to tdrive/backend/utils/nextcloud-migration/src/shell_ldap_user.ts index 111f83f1..9f466e84 100644 --- a/tdrive/backend/utils/nextcloud-migration/src/user/shell_ldap_user.ts +++ b/tdrive/backend/utils/nextcloud-migration/src/shell_ldap_user.ts @@ -1,7 +1,7 @@ import { LdapConfiguration } from './ldap_user'; import { exec } from 'child_process'; import ldif from 'ldif'; -import { logger } from "../logger" +import { logger } from "./logger" import { User, UserProvider } from "./user_privider"; export class ShellLdapUserProvider implements UserProvider { diff --git a/tdrive/backend/utils/nextcloud-migration/src/twake_client.ts b/tdrive/backend/utils/nextcloud-migration/src/twake_client.ts index 9f249acb..fedc1627 100644 --- a/tdrive/backend/utils/nextcloud-migration/src/twake_client.ts +++ b/tdrive/backend/utils/nextcloud-migration/src/twake_client.ts @@ -3,7 +3,7 @@ import FormData from 'form-data'; // @ts-ignore import fs from 'fs'; import { logger } from './logger'; -import { User } from "./user/user_privider"; +import { User } from "./user_privider"; type TwakeClientConfiguration = { url: string, diff --git a/tdrive/backend/utils/nextcloud-migration/src/user/user_privider.ts b/tdrive/backend/utils/nextcloud-migration/src/user_privider.ts similarity index 100% rename from tdrive/backend/utils/nextcloud-migration/src/user/user_privider.ts rename to tdrive/backend/utils/nextcloud-migration/src/user_privider.ts diff --git a/tdrive/backend/utils/nextcloud-migration/test/lemon.ldap.test.ts b/tdrive/backend/utils/nextcloud-migration/test/lemon.ldap.test.ts index 1994395b..5dc7bb09 100644 --- a/tdrive/backend/utils/nextcloud-migration/test/lemon.ldap.test.ts +++ b/tdrive/backend/utils/nextcloud-migration/test/lemon.ldap.test.ts @@ -1,5 +1,5 @@ import {describe, expect, test} from '@jest/globals'; -import { LemonLdapUserProvider, LemonLdapUserProviderConfig } from "../src/user/lemon_ldap_user_provider"; +import { LemonLdapUserProvider, LemonLdapUserProviderConfig } from "../src/lemon_ldap_user_provider"; //FOR LOCAL DEBUG PURPOSE ONLY, ITS NOT A TEST describe.skip('Lemon LDAP User Provider', () => { diff --git a/tdrive/backend/utils/nextcloud-migration/test/shell.ldap.test.ts b/tdrive/backend/utils/nextcloud-migration/test/shell.ldap.test.ts index f948a4c1..0923d7bd 100644 --- a/tdrive/backend/utils/nextcloud-migration/test/shell.ldap.test.ts +++ b/tdrive/backend/utils/nextcloud-migration/test/shell.ldap.test.ts @@ -1,6 +1,6 @@ import {describe, expect, test} from '@jest/globals'; -import { ShellLdapUserProvider } from '../src/user/shell_ldap_user'; -import { LdapConfiguration } from '../src/user/ldap_user'; +import { ShellLdapUserProvider } from '../src/shell_ldap_user'; +import { LdapConfiguration } from '../src/ldap_user'; //FOR LOCAL DEBUG PURPOSE ONLY, ITS NOT A TEST describe.skip('Shell LDAP User Provider', () => {