mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-31 03:22:18 +00:00
4.8.11 test (#2794)
* perf: version list type * perf: add node default value * perf: snapshot status * fix: version detail auth * fix: export defalt
This commit is contained in:
@@ -5,19 +5,17 @@ import type { FastGPTConfigFileType } from '@fastgpt/global/common/system/types/
|
||||
import { PluginSourceEnum } from '@fastgpt/global/core/plugin/constants';
|
||||
import { getFastGPTConfigFromDB } from '@fastgpt/service/common/system/config/controller';
|
||||
import { PluginTemplateType } from '@fastgpt/global/core/plugin/type';
|
||||
import { FastGPTProUrl } from '@fastgpt/service/common/system/constants';
|
||||
import { FastGPTProUrl, isProduction } from '@fastgpt/service/common/system/constants';
|
||||
import { initFastGPTConfig } from '@fastgpt/service/common/system/tools';
|
||||
import json5 from 'json5';
|
||||
import { SystemPluginTemplateItemType } from '@fastgpt/global/core/workflow/type';
|
||||
|
||||
export const readConfigData = (name: string) => {
|
||||
const isDev = process.env.NODE_ENV === 'development';
|
||||
|
||||
const splitName = name.split('.');
|
||||
const devName = `${splitName[0]}.local.${splitName[1]}`;
|
||||
|
||||
const filename = (() => {
|
||||
if (isDev) {
|
||||
if (!isProduction) {
|
||||
// check local file exists
|
||||
const hasLocalFile = existsSync(`data/${devName}`);
|
||||
if (hasLocalFile) {
|
||||
|
Reference in New Issue
Block a user