From 26acfd88a93f88c2a06408c9ee6fb51e0fc561d9 Mon Sep 17 00:00:00 2001 From: Justin Brooks Date: Fri, 15 Nov 2024 20:47:10 -0500 Subject: [PATCH] fix refers --- packages/auth/eslint.config.js | 6 +++++- packages/auth/src/config.ts | 4 ++-- packages/auth/src/index.rsc.ts | 4 ++-- packages/auth/src/index.ts | 4 ++-- packages/auth/src/utils/can.ts | 2 +- packages/auth/src/utils/index.ts | 6 +++--- 6 files changed, 15 insertions(+), 11 deletions(-) diff --git a/packages/auth/eslint.config.js b/packages/auth/eslint.config.js index 2b5b0ecb..6a2dde58 100644 --- a/packages/auth/eslint.config.js +++ b/packages/auth/eslint.config.js @@ -1,4 +1,7 @@ -import baseConfig, { restrictEnvAccess } from "@ctrlplane/eslint-config/base"; +import baseConfig, { + requireJsSuffix, + restrictEnvAccess, +} from "@ctrlplane/eslint-config/base"; /** @type {import('typescript-eslint').Config} */ export default [ @@ -6,5 +9,6 @@ export default [ ignores: ["dist/**", "node_modules/**"], }, ...baseConfig, + ...requireJsSuffix, ...restrictEnvAccess, ]; diff --git a/packages/auth/src/config.ts b/packages/auth/src/config.ts index 3cd89ec7..3c426309 100644 --- a/packages/auth/src/config.ts +++ b/packages/auth/src/config.ts @@ -11,8 +11,8 @@ import { db } from "@ctrlplane/db/client"; import * as schema from "@ctrlplane/db/schema"; import { signInSchema } from "@ctrlplane/validators/auth"; -import { env } from "./env"; -import { getUserByCredentials } from "./utils/credentials"; +import { env } from "./env.js"; +import { getUserByCredentials } from "./utils/credentials.js"; declare module "next-auth" { interface Session { diff --git a/packages/auth/src/index.rsc.ts b/packages/auth/src/index.rsc.ts index b208e852..b143a115 100644 --- a/packages/auth/src/index.rsc.ts +++ b/packages/auth/src/index.rsc.ts @@ -1,9 +1,9 @@ import { cache } from "react"; import NextAuth from "next-auth"; -import { authConfig } from "./config"; +import { authConfig } from "./config.js"; -export * from "./config"; +export * from "./config.js"; export type { Session } from "next-auth"; const { diff --git a/packages/auth/src/index.ts b/packages/auth/src/index.ts index 712d2a2f..0833d47d 100644 --- a/packages/auth/src/index.ts +++ b/packages/auth/src/index.ts @@ -1,8 +1,8 @@ import NextAuth from "next-auth"; -import { authConfig } from "./config"; +import { authConfig } from "./config.js"; -export * from "./config"; +export * from "./config.js"; export type { Session } from "next-auth"; const { diff --git a/packages/auth/src/utils/can.ts b/packages/auth/src/utils/can.ts index a55e7434..8adee348 100644 --- a/packages/auth/src/utils/can.ts +++ b/packages/auth/src/utils/can.ts @@ -1,6 +1,6 @@ import type { EntityType, ScopeType } from "@ctrlplane/db/schema"; -import { checkEntityPermissionForResource } from "./rbac"; +import { checkEntityPermissionForResource } from "./rbac.js"; // New type definition export type CanFunction = { diff --git a/packages/auth/src/utils/index.ts b/packages/auth/src/utils/index.ts index 68a47886..077a861b 100644 --- a/packages/auth/src/utils/index.ts +++ b/packages/auth/src/utils/index.ts @@ -1,3 +1,3 @@ -export * from "./api-key"; -export * from "./rbac"; -export * from "./can"; +export * from "./api-key.js"; +export * from "./rbac.js"; +export * from "./can.js";