Skip to content

Commit 41c068c

Browse files
authored
improvement(lib): refactored lib/ to be more aligned with queries and api directory (#2160)
* fix(lib): consolidate into core dir in lib/ * refactored lib/
1 parent 6fda9bd commit 41c068c

File tree

707 files changed

+1772
-1749
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

707 files changed

+1772
-1749
lines changed

apps/sim/app/(auth)/components/auth-background.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { cn } from '@/lib/utils'
1+
import { cn } from '@/lib/core/utils/cn'
22
import AuthBackgroundSVG from '@/app/(auth)/components/auth-background-svg'
33

44
type AuthBackgroundProps = {

apps/sim/app/(auth)/components/oauth-provider-checker.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
'use server'
22

3-
import { env } from '@/lib/env'
4-
import { isProd } from '@/lib/environment'
3+
import { env } from '@/lib/core/config/env'
4+
import { isProd } from '@/lib/core/config/environment'
55

66
export async function getOAuthProviderStatus() {
77
const githubAvailable = !!(env.GITHUB_CLIENT_ID && env.GITHUB_CLIENT_SECRET)

apps/sim/app/(auth)/components/social-login-buttons.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import { type ReactNode, useEffect, useState } from 'react'
44
import { GithubIcon, GoogleIcon } from '@/components/icons'
55
import { Button } from '@/components/ui/button'
6-
import { client } from '@/lib/auth-client'
6+
import { client } from '@/lib/auth/auth-client'
77
import { inter } from '@/app/_styles/fonts/inter/inter'
88

99
interface SocialLoginButtonsProps {

apps/sim/app/(auth)/components/sso-login-button.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
import { useRouter } from 'next/navigation'
44
import { Button } from '@/components/ui/button'
5-
import { getEnv, isTruthy } from '@/lib/env'
6-
import { cn } from '@/lib/utils'
5+
import { getEnv, isTruthy } from '@/lib/core/config/env'
6+
import { cn } from '@/lib/core/utils/cn'
77

88
interface SSOLoginButtonProps {
99
callbackURL?: string

apps/sim/app/(auth)/login/login-form.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ import {
1414
} from '@/components/ui/dialog'
1515
import { Input } from '@/components/ui/input'
1616
import { Label } from '@/components/ui/label'
17-
import { client } from '@/lib/auth-client'
18-
import { quickValidateEmail } from '@/lib/email/validation'
19-
import { getEnv, isFalsy, isTruthy } from '@/lib/env'
17+
import { client } from '@/lib/auth/auth-client'
18+
import { getEnv, isFalsy, isTruthy } from '@/lib/core/config/env'
19+
import { cn } from '@/lib/core/utils/cn'
20+
import { getBaseUrl } from '@/lib/core/utils/urls'
2021
import { createLogger } from '@/lib/logs/console/logger'
21-
import { getBaseUrl } from '@/lib/urls/utils'
22-
import { cn } from '@/lib/utils'
22+
import { quickValidateEmail } from '@/lib/messaging/email/validation'
2323
import { inter } from '@/app/_styles/fonts/inter/inter'
2424
import { soehne } from '@/app/_styles/fonts/soehne/soehne'
2525
import { SocialLoginButtons } from '@/app/(auth)/components/social-login-buttons'

apps/sim/app/(auth)/reset-password/reset-password-form.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { ArrowRight, ChevronRight, Eye, EyeOff } from 'lucide-react'
55
import { Button } from '@/components/ui/button'
66
import { Input } from '@/components/ui/input'
77
import { Label } from '@/components/ui/label'
8-
import { cn } from '@/lib/utils'
8+
import { cn } from '@/lib/core/utils/cn'
99
import { inter } from '@/app/_styles/fonts/inter/inter'
1010

1111
interface RequestResetFormProps {

apps/sim/app/(auth)/signup/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { env, isTruthy } from '@/lib/env'
1+
import { env, isTruthy } from '@/lib/core/config/env'
22
import { getOAuthProviderStatus } from '@/app/(auth)/components/oauth-provider-checker'
33
import SignupForm from '@/app/(auth)/signup/signup-form'
44

apps/sim/app/(auth)/signup/signup-form.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ import { useRouter, useSearchParams } from 'next/navigation'
77
import { Button } from '@/components/ui/button'
88
import { Input } from '@/components/ui/input'
99
import { Label } from '@/components/ui/label'
10-
import { client, useSession } from '@/lib/auth-client'
11-
import { quickValidateEmail } from '@/lib/email/validation'
12-
import { getEnv, isFalsy, isTruthy } from '@/lib/env'
10+
import { client, useSession } from '@/lib/auth/auth-client'
11+
import { getEnv, isFalsy, isTruthy } from '@/lib/core/config/env'
12+
import { cn } from '@/lib/core/utils/cn'
1313
import { createLogger } from '@/lib/logs/console/logger'
14-
import { cn } from '@/lib/utils'
14+
import { quickValidateEmail } from '@/lib/messaging/email/validation'
1515
import { inter } from '@/app/_styles/fonts/inter/inter'
1616
import { soehne } from '@/app/_styles/fonts/soehne/soehne'
1717
import { SocialLoginButtons } from '@/app/(auth)/components/social-login-buttons'

apps/sim/app/(auth)/sso/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { redirect } from 'next/navigation'
2-
import { getEnv, isTruthy } from '@/lib/env'
2+
import { getEnv, isTruthy } from '@/lib/core/config/env'
33
import SSOForm from '@/app/(auth)/sso/sso-form'
44

55
export const dynamic = 'force-dynamic'

apps/sim/app/(auth)/sso/sso-form.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ import { useRouter, useSearchParams } from 'next/navigation'
66
import { Button } from '@/components/ui/button'
77
import { Input } from '@/components/ui/input'
88
import { Label } from '@/components/ui/label'
9-
import { client } from '@/lib/auth-client'
10-
import { quickValidateEmail } from '@/lib/email/validation'
11-
import { env, isFalsy } from '@/lib/env'
9+
import { client } from '@/lib/auth/auth-client'
10+
import { env, isFalsy } from '@/lib/core/config/env'
11+
import { cn } from '@/lib/core/utils/cn'
1212
import { createLogger } from '@/lib/logs/console/logger'
13-
import { cn } from '@/lib/utils'
13+
import { quickValidateEmail } from '@/lib/messaging/email/validation'
1414
import { inter } from '@/app/_styles/fonts/inter/inter'
1515
import { soehne } from '@/app/_styles/fonts/soehne/soehne'
1616

0 commit comments

Comments
 (0)