From 7437ea22b26924ea108c4041cd33520cdc0c7e07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20St=C3=B8vring?= Date: Tue, 25 Jun 2024 18:24:16 +0200 Subject: [PATCH] Uses dashes in folder names --- src/common/index.ts | 4 ++-- .../{keyValueStore => key-value-store}/IKeyValueStore.ts | 0 .../RedisKeyValueStore.ts | 0 src/common/{keyValueStore => key-value-store}/index.ts | 0 src/common/{userData => user-data}/IUserDataRepository.ts | 0 .../{userData => user-data}/KeyValueUserDataRepository.ts | 2 +- src/common/{userData => user-data}/index.ts | 0 src/composition.ts | 2 +- src/features/auth/domain/index.ts | 8 ++++---- .../auth/domain/{logIn => log-in}/ILogInHandler.ts | 0 .../auth/domain/{logIn => log-in}/LogInHandler.ts | 0 src/features/auth/domain/{logIn => log-in}/index.ts | 0 .../domain/{logOut => log-out}/CompositeLogOutHandler.ts | 0 .../{logOut => log-out}/ErrorIgnoringLogOutHandler.ts | 0 .../auth/domain/{logOut => log-out}/ILogOutHandler.ts | 0 .../{logOut => log-out}/UserDataCleanUpLogOutHandler.ts | 0 src/features/auth/domain/{logOut => log-out}/index.ts | 0 .../auth/domain/{oAuthToken => oauth-token}/OAuthToken.ts | 0 .../data-source/GuestOAuthTokenDataSource.ts | 0 .../data-source/IOAuthTokenDataSource.ts | 0 .../data-source/PersistingOAuthTokenDataSource.ts | 0 .../auth/domain/{oAuthToken => oauth-token}/index.ts | 0 .../AccountProviderTypeBasedOAuthTokenRefresher.ts | 0 .../refresher/GuestOAuthTokenRefresher.ts | 0 .../refresher/IOAuthTokenRefresher.ts | 0 .../refresher/LockingOAuthTokenRefresher.ts | 0 .../refresher/PersistingOAuthTokenRefresher.ts | 0 .../repository/AuthjsAccountsOAuthTokenRepository.ts | 0 .../repository/CompositeOAuthTokenRepository.ts | 0 .../repository/IOAuthTokenRepository.ts | 0 .../repository/OAuthTokenRepository.ts | 0 .../GitHubOrganizationSessionValidator.ts | 2 -- .../OAuthTokenSessionValidator.ts | 0 .../SessionValidity.ts | 0 .../domain/{sessionValidity => session-validity}/index.ts | 0 .../useRepositoryAccess.ts | 0 .../useSessionValidity.ts | 0 37 files changed, 8 insertions(+), 10 deletions(-) rename src/common/{keyValueStore => key-value-store}/IKeyValueStore.ts (100%) rename src/common/{keyValueStore => key-value-store}/RedisKeyValueStore.ts (100%) rename src/common/{keyValueStore => key-value-store}/index.ts (100%) rename src/common/{userData => user-data}/IUserDataRepository.ts (100%) rename src/common/{userData => user-data}/KeyValueUserDataRepository.ts (93%) rename src/common/{userData => user-data}/index.ts (100%) rename src/features/auth/domain/{logIn => log-in}/ILogInHandler.ts (100%) rename src/features/auth/domain/{logIn => log-in}/LogInHandler.ts (100%) rename src/features/auth/domain/{logIn => log-in}/index.ts (100%) rename src/features/auth/domain/{logOut => log-out}/CompositeLogOutHandler.ts (100%) rename src/features/auth/domain/{logOut => log-out}/ErrorIgnoringLogOutHandler.ts (100%) rename src/features/auth/domain/{logOut => log-out}/ILogOutHandler.ts (100%) rename src/features/auth/domain/{logOut => log-out}/UserDataCleanUpLogOutHandler.ts (100%) rename src/features/auth/domain/{logOut => log-out}/index.ts (100%) rename src/features/auth/domain/{oAuthToken => oauth-token}/OAuthToken.ts (100%) rename src/features/auth/domain/{oAuthToken => oauth-token}/data-source/GuestOAuthTokenDataSource.ts (100%) rename src/features/auth/domain/{oAuthToken => oauth-token}/data-source/IOAuthTokenDataSource.ts (100%) rename src/features/auth/domain/{oAuthToken => oauth-token}/data-source/PersistingOAuthTokenDataSource.ts (100%) rename src/features/auth/domain/{oAuthToken => oauth-token}/index.ts (100%) rename src/features/auth/domain/{oAuthToken => oauth-token}/refresher/AccountProviderTypeBasedOAuthTokenRefresher.ts (100%) rename src/features/auth/domain/{oAuthToken => oauth-token}/refresher/GuestOAuthTokenRefresher.ts (100%) rename src/features/auth/domain/{oAuthToken => oauth-token}/refresher/IOAuthTokenRefresher.ts (100%) rename src/features/auth/domain/{oAuthToken => oauth-token}/refresher/LockingOAuthTokenRefresher.ts (100%) rename src/features/auth/domain/{oAuthToken => oauth-token}/refresher/PersistingOAuthTokenRefresher.ts (100%) rename src/features/auth/domain/{oAuthToken => oauth-token}/repository/AuthjsAccountsOAuthTokenRepository.ts (100%) rename src/features/auth/domain/{oAuthToken => oauth-token}/repository/CompositeOAuthTokenRepository.ts (100%) rename src/features/auth/domain/{oAuthToken => oauth-token}/repository/IOAuthTokenRepository.ts (100%) rename src/features/auth/domain/{oAuthToken => oauth-token}/repository/OAuthTokenRepository.ts (100%) rename src/features/auth/domain/{sessionValidity => session-validity}/GitHubOrganizationSessionValidator.ts (97%) rename src/features/auth/domain/{sessionValidity => session-validity}/OAuthTokenSessionValidator.ts (100%) rename src/features/auth/domain/{sessionValidity => session-validity}/SessionValidity.ts (100%) rename src/features/auth/domain/{sessionValidity => session-validity}/index.ts (100%) rename src/features/auth/domain/{sessionValidity => session-validity}/useRepositoryAccess.ts (100%) rename src/features/auth/domain/{sessionValidity => session-validity}/useSessionValidity.ts (100%) diff --git a/src/common/index.ts b/src/common/index.ts index 4be9c4a1..fdb90059 100644 --- a/src/common/index.ts +++ b/src/common/index.ts @@ -1,8 +1,8 @@ export * from "./db" export * from "./errors" export * from "./github" -export * from "./keyValueStore" +export * from "./key-value-store" export * from "./mutex" export * from "./session" -export * from "./userData" +export * from "./user-data" export * from "./utils" diff --git a/src/common/keyValueStore/IKeyValueStore.ts b/src/common/key-value-store/IKeyValueStore.ts similarity index 100% rename from src/common/keyValueStore/IKeyValueStore.ts rename to src/common/key-value-store/IKeyValueStore.ts diff --git a/src/common/keyValueStore/RedisKeyValueStore.ts b/src/common/key-value-store/RedisKeyValueStore.ts similarity index 100% rename from src/common/keyValueStore/RedisKeyValueStore.ts rename to src/common/key-value-store/RedisKeyValueStore.ts diff --git a/src/common/keyValueStore/index.ts b/src/common/key-value-store/index.ts similarity index 100% rename from src/common/keyValueStore/index.ts rename to src/common/key-value-store/index.ts diff --git a/src/common/userData/IUserDataRepository.ts b/src/common/user-data/IUserDataRepository.ts similarity index 100% rename from src/common/userData/IUserDataRepository.ts rename to src/common/user-data/IUserDataRepository.ts diff --git a/src/common/userData/KeyValueUserDataRepository.ts b/src/common/user-data/KeyValueUserDataRepository.ts similarity index 93% rename from src/common/userData/KeyValueUserDataRepository.ts rename to src/common/user-data/KeyValueUserDataRepository.ts index b6318099..95b05734 100644 --- a/src/common/userData/KeyValueUserDataRepository.ts +++ b/src/common/user-data/KeyValueUserDataRepository.ts @@ -1,4 +1,4 @@ -import IKeyValueStore from "../keyValueStore/IKeyValueStore" +import IKeyValueStore from "../key-value-store/IKeyValueStore" import IUserDataRepository from "./IUserDataRepository" export default class KeyValueUserDataRepository implements IUserDataRepository { diff --git a/src/common/userData/index.ts b/src/common/user-data/index.ts similarity index 100% rename from src/common/userData/index.ts rename to src/common/user-data/index.ts diff --git a/src/composition.ts b/src/composition.ts index d285e738..4596afe1 100644 --- a/src/composition.ts +++ b/src/composition.ts @@ -4,7 +4,7 @@ import GithubProvider from "next-auth/providers/github" import EmailProvider from "next-auth/providers/nodemailer" import PostgresAdapter from "@auth/pg-adapter" import RedisKeyedMutexFactory from "@/common/mutex/RedisKeyedMutexFactory" -import RedisKeyValueStore from "@/common/keyValueStore/RedisKeyValueStore" +import RedisKeyValueStore from "@/common/key-value-store/RedisKeyValueStore" import { AuthjsSession, GitHubClient, diff --git a/src/features/auth/domain/index.ts b/src/features/auth/domain/index.ts index bc75946a..902ad6fe 100644 --- a/src/features/auth/domain/index.ts +++ b/src/features/auth/domain/index.ts @@ -1,4 +1,4 @@ -export * from "./logIn" -export * from "./logOut" -export * from "./oAuthToken" -export * from "./sessionValidity" +export * from "./log-in" +export * from "./log-out" +export * from "./oauth-token" +export * from "./session-validity" diff --git a/src/features/auth/domain/logIn/ILogInHandler.ts b/src/features/auth/domain/log-in/ILogInHandler.ts similarity index 100% rename from src/features/auth/domain/logIn/ILogInHandler.ts rename to src/features/auth/domain/log-in/ILogInHandler.ts diff --git a/src/features/auth/domain/logIn/LogInHandler.ts b/src/features/auth/domain/log-in/LogInHandler.ts similarity index 100% rename from src/features/auth/domain/logIn/LogInHandler.ts rename to src/features/auth/domain/log-in/LogInHandler.ts diff --git a/src/features/auth/domain/logIn/index.ts b/src/features/auth/domain/log-in/index.ts similarity index 100% rename from src/features/auth/domain/logIn/index.ts rename to src/features/auth/domain/log-in/index.ts diff --git a/src/features/auth/domain/logOut/CompositeLogOutHandler.ts b/src/features/auth/domain/log-out/CompositeLogOutHandler.ts similarity index 100% rename from src/features/auth/domain/logOut/CompositeLogOutHandler.ts rename to src/features/auth/domain/log-out/CompositeLogOutHandler.ts diff --git a/src/features/auth/domain/logOut/ErrorIgnoringLogOutHandler.ts b/src/features/auth/domain/log-out/ErrorIgnoringLogOutHandler.ts similarity index 100% rename from src/features/auth/domain/logOut/ErrorIgnoringLogOutHandler.ts rename to src/features/auth/domain/log-out/ErrorIgnoringLogOutHandler.ts diff --git a/src/features/auth/domain/logOut/ILogOutHandler.ts b/src/features/auth/domain/log-out/ILogOutHandler.ts similarity index 100% rename from src/features/auth/domain/logOut/ILogOutHandler.ts rename to src/features/auth/domain/log-out/ILogOutHandler.ts diff --git a/src/features/auth/domain/logOut/UserDataCleanUpLogOutHandler.ts b/src/features/auth/domain/log-out/UserDataCleanUpLogOutHandler.ts similarity index 100% rename from src/features/auth/domain/logOut/UserDataCleanUpLogOutHandler.ts rename to src/features/auth/domain/log-out/UserDataCleanUpLogOutHandler.ts diff --git a/src/features/auth/domain/logOut/index.ts b/src/features/auth/domain/log-out/index.ts similarity index 100% rename from src/features/auth/domain/logOut/index.ts rename to src/features/auth/domain/log-out/index.ts diff --git a/src/features/auth/domain/oAuthToken/OAuthToken.ts b/src/features/auth/domain/oauth-token/OAuthToken.ts similarity index 100% rename from src/features/auth/domain/oAuthToken/OAuthToken.ts rename to src/features/auth/domain/oauth-token/OAuthToken.ts diff --git a/src/features/auth/domain/oAuthToken/data-source/GuestOAuthTokenDataSource.ts b/src/features/auth/domain/oauth-token/data-source/GuestOAuthTokenDataSource.ts similarity index 100% rename from src/features/auth/domain/oAuthToken/data-source/GuestOAuthTokenDataSource.ts rename to src/features/auth/domain/oauth-token/data-source/GuestOAuthTokenDataSource.ts diff --git a/src/features/auth/domain/oAuthToken/data-source/IOAuthTokenDataSource.ts b/src/features/auth/domain/oauth-token/data-source/IOAuthTokenDataSource.ts similarity index 100% rename from src/features/auth/domain/oAuthToken/data-source/IOAuthTokenDataSource.ts rename to src/features/auth/domain/oauth-token/data-source/IOAuthTokenDataSource.ts diff --git a/src/features/auth/domain/oAuthToken/data-source/PersistingOAuthTokenDataSource.ts b/src/features/auth/domain/oauth-token/data-source/PersistingOAuthTokenDataSource.ts similarity index 100% rename from src/features/auth/domain/oAuthToken/data-source/PersistingOAuthTokenDataSource.ts rename to src/features/auth/domain/oauth-token/data-source/PersistingOAuthTokenDataSource.ts diff --git a/src/features/auth/domain/oAuthToken/index.ts b/src/features/auth/domain/oauth-token/index.ts similarity index 100% rename from src/features/auth/domain/oAuthToken/index.ts rename to src/features/auth/domain/oauth-token/index.ts diff --git a/src/features/auth/domain/oAuthToken/refresher/AccountProviderTypeBasedOAuthTokenRefresher.ts b/src/features/auth/domain/oauth-token/refresher/AccountProviderTypeBasedOAuthTokenRefresher.ts similarity index 100% rename from src/features/auth/domain/oAuthToken/refresher/AccountProviderTypeBasedOAuthTokenRefresher.ts rename to src/features/auth/domain/oauth-token/refresher/AccountProviderTypeBasedOAuthTokenRefresher.ts diff --git a/src/features/auth/domain/oAuthToken/refresher/GuestOAuthTokenRefresher.ts b/src/features/auth/domain/oauth-token/refresher/GuestOAuthTokenRefresher.ts similarity index 100% rename from src/features/auth/domain/oAuthToken/refresher/GuestOAuthTokenRefresher.ts rename to src/features/auth/domain/oauth-token/refresher/GuestOAuthTokenRefresher.ts diff --git a/src/features/auth/domain/oAuthToken/refresher/IOAuthTokenRefresher.ts b/src/features/auth/domain/oauth-token/refresher/IOAuthTokenRefresher.ts similarity index 100% rename from src/features/auth/domain/oAuthToken/refresher/IOAuthTokenRefresher.ts rename to src/features/auth/domain/oauth-token/refresher/IOAuthTokenRefresher.ts diff --git a/src/features/auth/domain/oAuthToken/refresher/LockingOAuthTokenRefresher.ts b/src/features/auth/domain/oauth-token/refresher/LockingOAuthTokenRefresher.ts similarity index 100% rename from src/features/auth/domain/oAuthToken/refresher/LockingOAuthTokenRefresher.ts rename to src/features/auth/domain/oauth-token/refresher/LockingOAuthTokenRefresher.ts diff --git a/src/features/auth/domain/oAuthToken/refresher/PersistingOAuthTokenRefresher.ts b/src/features/auth/domain/oauth-token/refresher/PersistingOAuthTokenRefresher.ts similarity index 100% rename from src/features/auth/domain/oAuthToken/refresher/PersistingOAuthTokenRefresher.ts rename to src/features/auth/domain/oauth-token/refresher/PersistingOAuthTokenRefresher.ts diff --git a/src/features/auth/domain/oAuthToken/repository/AuthjsAccountsOAuthTokenRepository.ts b/src/features/auth/domain/oauth-token/repository/AuthjsAccountsOAuthTokenRepository.ts similarity index 100% rename from src/features/auth/domain/oAuthToken/repository/AuthjsAccountsOAuthTokenRepository.ts rename to src/features/auth/domain/oauth-token/repository/AuthjsAccountsOAuthTokenRepository.ts diff --git a/src/features/auth/domain/oAuthToken/repository/CompositeOAuthTokenRepository.ts b/src/features/auth/domain/oauth-token/repository/CompositeOAuthTokenRepository.ts similarity index 100% rename from src/features/auth/domain/oAuthToken/repository/CompositeOAuthTokenRepository.ts rename to src/features/auth/domain/oauth-token/repository/CompositeOAuthTokenRepository.ts diff --git a/src/features/auth/domain/oAuthToken/repository/IOAuthTokenRepository.ts b/src/features/auth/domain/oauth-token/repository/IOAuthTokenRepository.ts similarity index 100% rename from src/features/auth/domain/oAuthToken/repository/IOAuthTokenRepository.ts rename to src/features/auth/domain/oauth-token/repository/IOAuthTokenRepository.ts diff --git a/src/features/auth/domain/oAuthToken/repository/OAuthTokenRepository.ts b/src/features/auth/domain/oauth-token/repository/OAuthTokenRepository.ts similarity index 100% rename from src/features/auth/domain/oAuthToken/repository/OAuthTokenRepository.ts rename to src/features/auth/domain/oauth-token/repository/OAuthTokenRepository.ts diff --git a/src/features/auth/domain/sessionValidity/GitHubOrganizationSessionValidator.ts b/src/features/auth/domain/session-validity/GitHubOrganizationSessionValidator.ts similarity index 97% rename from src/features/auth/domain/sessionValidity/GitHubOrganizationSessionValidator.ts rename to src/features/auth/domain/session-validity/GitHubOrganizationSessionValidator.ts index b227c7cd..0c69504c 100644 --- a/src/features/auth/domain/sessionValidity/GitHubOrganizationSessionValidator.ts +++ b/src/features/auth/domain/session-validity/GitHubOrganizationSessionValidator.ts @@ -34,9 +34,7 @@ export default class GitHubOrganizationSessionValidator { async validateSession(): Promise { const accountProvider = await this.accountProviderReader.getAccountProvider() - console.log(accountProvider) if (accountProvider !== "github") { - console.log("FOOO") // Only validate GitHub sessions and consider any other valid. return SessionValidity.VALID } diff --git a/src/features/auth/domain/sessionValidity/OAuthTokenSessionValidator.ts b/src/features/auth/domain/session-validity/OAuthTokenSessionValidator.ts similarity index 100% rename from src/features/auth/domain/sessionValidity/OAuthTokenSessionValidator.ts rename to src/features/auth/domain/session-validity/OAuthTokenSessionValidator.ts diff --git a/src/features/auth/domain/sessionValidity/SessionValidity.ts b/src/features/auth/domain/session-validity/SessionValidity.ts similarity index 100% rename from src/features/auth/domain/sessionValidity/SessionValidity.ts rename to src/features/auth/domain/session-validity/SessionValidity.ts diff --git a/src/features/auth/domain/sessionValidity/index.ts b/src/features/auth/domain/session-validity/index.ts similarity index 100% rename from src/features/auth/domain/sessionValidity/index.ts rename to src/features/auth/domain/session-validity/index.ts diff --git a/src/features/auth/domain/sessionValidity/useRepositoryAccess.ts b/src/features/auth/domain/session-validity/useRepositoryAccess.ts similarity index 100% rename from src/features/auth/domain/sessionValidity/useRepositoryAccess.ts rename to src/features/auth/domain/session-validity/useRepositoryAccess.ts diff --git a/src/features/auth/domain/sessionValidity/useSessionValidity.ts b/src/features/auth/domain/session-validity/useSessionValidity.ts similarity index 100% rename from src/features/auth/domain/sessionValidity/useSessionValidity.ts rename to src/features/auth/domain/session-validity/useSessionValidity.ts