mirror of
https://github.com/lobehub/lobe-chat.git
synced 2026-06-18 05:18:31 +00:00
♻️ refactor: refactor const folder to a new package (#8756)
* refactor * update * refactor
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"name": "@lobechat/const",
|
||||
"version": "1.0.0",
|
||||
"private": true,
|
||||
"main": "./src/index.ts"
|
||||
}
|
||||
@@ -2,17 +2,15 @@
|
||||
* Image generation and processing configuration constants
|
||||
*/
|
||||
export const IMAGE_GENERATION_CONFIG = {
|
||||
|
||||
/**
|
||||
* Maximum cover image size in pixels (longest edge)
|
||||
* Used for generating cover images from source images
|
||||
*/
|
||||
COVER_MAX_SIZE: 256,
|
||||
COVER_MAX_SIZE: 256,
|
||||
|
||||
|
||||
/**
|
||||
* Maximum thumbnail size in pixels (longest edge)
|
||||
* Used for generating thumbnail images from original images
|
||||
*/
|
||||
THUMBNAIL_MAX_SIZE: 512,
|
||||
THUMBNAIL_MAX_SIZE: 512,
|
||||
} as const;
|
||||
@@ -4,7 +4,6 @@ import urlJoin from 'url-join';
|
||||
import { withBasePath } from '@/utils/basePath';
|
||||
import { isDev } from '@/utils/env';
|
||||
|
||||
import pkg from '../../package.json';
|
||||
import { INBOX_SESSION_ID } from './session';
|
||||
|
||||
export const UTM_SOURCE = 'chat_preview';
|
||||
@@ -15,7 +14,7 @@ export const OFFICIAL_SITE = 'https://lobehub.com';
|
||||
|
||||
export const OG_URL = '/og/cover.png?v=1';
|
||||
|
||||
export const GITHUB = pkg.homepage;
|
||||
export const GITHUB = 'https://github.com/lobehub/lobe-chat';
|
||||
export const GITHUB_ISSUES = urlJoin(GITHUB, 'issues/new/choose');
|
||||
export const CHANGELOG = 'https://lobehub.com/changelog';
|
||||
export const DOCKER_IMAGE = 'https://hub.docker.com/r/lobehub/lobe-chat';
|
||||
@@ -36,7 +35,7 @@ export const MANUAL_UPGRADE_URL = urlJoin(SELF_HOSTING_DOCUMENTS, '/advanced/ups
|
||||
export const BLOG = urlJoin(OFFICIAL_SITE, 'blog');
|
||||
|
||||
export const ABOUT = OFFICIAL_SITE;
|
||||
export const FEEDBACK = pkg.bugs.url;
|
||||
export const FEEDBACK = 'https://github.com/lobehub/lobe-chat/issues/new/choose';
|
||||
export const PRIVACY_URL = urlJoin(OFFICIAL_SITE, '/privacy');
|
||||
export const TERMS_URL = urlJoin(OFFICIAL_SITE, '/terms');
|
||||
|
||||
+1
-1
@@ -5,6 +5,7 @@ import { UAParser } from 'ua-parser-js';
|
||||
import urlJoin from 'url-join';
|
||||
|
||||
import { authEnv } from '@/config/auth';
|
||||
import { OAUTH_AUTHORIZED } from '@/const/auth';
|
||||
import { LOBE_LOCALE_COOKIE } from '@/const/locale';
|
||||
import { LOBE_THEME_APPEARANCE } from '@/const/theme';
|
||||
import { appEnv } from '@/envs/app';
|
||||
@@ -14,7 +15,6 @@ import { parseBrowserLanguage } from '@/utils/locale';
|
||||
import { parseDefaultThemeFromCountry } from '@/utils/server/geo';
|
||||
import { RouteVariants } from '@/utils/server/routeVariants';
|
||||
|
||||
import { OAUTH_AUTHORIZED } from './const/auth';
|
||||
import { oidcEnv } from './envs/oidc';
|
||||
|
||||
// Create debug logger instances
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
"paths": {
|
||||
"@/libs/model-runtime": ["./packages/model-runtime/src/index.ts"],
|
||||
"@/libs/model-runtime/*": ["./packages/model-runtime/src/*"],
|
||||
"@/const/*": ["./packages/const/src/*"],
|
||||
"@/types/*": ["./packages/types/src/*", "./src/types/*"],
|
||||
"@/*": ["./src/*"],
|
||||
"~test-utils": ["./tests/utils.tsx"]
|
||||
|
||||
@@ -5,6 +5,7 @@ export default defineConfig({
|
||||
test: {
|
||||
alias: {
|
||||
/* eslint-disable sort-keys-fix/sort-keys-fix */
|
||||
'@/const': resolve(__dirname, './packages/const/src'),
|
||||
'@/types': resolve(__dirname, './packages/types/src'),
|
||||
'@': resolve(__dirname, './src'),
|
||||
/* eslint-enable */
|
||||
|
||||
@@ -11,6 +11,7 @@ export default defineConfig({
|
||||
/* eslint-disable sort-keys-fix/sort-keys-fix */
|
||||
'@/libs/model-runtime': resolve(__dirname, './packages/model-runtime/src'),
|
||||
'@/types': resolve(__dirname, './packages/types/src'),
|
||||
'@/const': resolve(__dirname, './packages/const/src'),
|
||||
'@': resolve(__dirname, './src'),
|
||||
'~test-utils': resolve(__dirname, './tests/utils.tsx'),
|
||||
/* eslint-enable */
|
||||
|
||||
Reference in New Issue
Block a user