From 5cbd7a3d85b70bc3d2cfb8045d86d6310912d765 Mon Sep 17 00:00:00 2001 From: manchenkoff Date: Thu, 18 Apr 2024 12:23:32 +0200 Subject: [PATCH] fix: resolved constant visibility issue --- package.json | 2 +- src/constants.ts | 1 - src/module.ts | 3 ++- src/runtime/plugin.ts | 3 ++- 4 files changed, 5 insertions(+), 4 deletions(-) delete mode 100644 src/constants.ts diff --git a/package.json b/package.json index 0ea47e2..05ce9f2 100644 --- a/package.json +++ b/package.json @@ -63,4 +63,4 @@ "vue-tsc": "^1.8.26" }, "packageManager": "yarn@4.1.1" -} \ No newline at end of file +} diff --git a/src/constants.ts b/src/constants.ts deleted file mode 100644 index bce57f2..0000000 --- a/src/constants.ts +++ /dev/null @@ -1 +0,0 @@ -export const LOGGER_NAME = 'nuxt-auth-sanctum'; diff --git a/src/module.ts b/src/module.ts index 22d83c5..20112a7 100644 --- a/src/module.ts +++ b/src/module.ts @@ -8,12 +8,13 @@ import { } from '@nuxt/kit'; import { defu } from 'defu'; import type { SanctumModuleOptions } from './types'; -import { LOGGER_NAME } from './constants'; type DeepPartial = { [P in keyof T]?: T[P] extends object ? DeepPartial : T[P]; }; +const LOGGER_NAME = 'nuxt-auth-sanctum'; + export default defineNuxtModule>({ meta: { name: 'nuxt-auth-sanctum', diff --git a/src/runtime/plugin.ts b/src/runtime/plugin.ts index 15655d1..c7c96a6 100644 --- a/src/runtime/plugin.ts +++ b/src/runtime/plugin.ts @@ -4,7 +4,8 @@ import { createHttpClient } from './httpFactory'; import { useSanctumUser } from './composables/useSanctumUser'; import { useSanctumConfig } from './composables/useSanctumConfig'; import { createConsola, type ConsolaInstance } from 'consola'; -import { LOGGER_NAME } from '../constants'; + +const LOGGER_NAME = 'nuxt-auth-sanctum'; function createSanctumLogger(logLevel: number) { const envSuffix = import.meta.env.SSR ? 'ssr' : 'csr';