💥 feat(断路器): 完成断路器调试开发及打包

This commit is contained in:
fhysy 2024-07-12 16:16:48 +08:00
parent 13cc39cd4a
commit b6962e2da6
114 changed files with 172079 additions and 138 deletions

1
.gitignore vendored
View File

@ -1,5 +1,4 @@
node_modules
dist
out
.DS_Store
*.log*

View File

@ -2,14 +2,12 @@
<code_scheme name="Project" version="173">
<HTMLCodeStyleSettings>
<option name="HTML_SPACE_INSIDE_EMPTY_TAG" value="true" />
<option name="HTML_QUOTE_STYLE" value="Single" />
<option name="HTML_ENFORCE_QUOTES" value="true" />
</HTMLCodeStyleSettings>
<JSCodeStyleSettings version="0">
<option name="USE_SEMICOLON_AFTER_STATEMENT" value="false" />
<option name="FORCE_SEMICOLON_STYLE" value="true" />
<option name="SPACE_BEFORE_FUNCTION_LEFT_PARENTH" value="false" />
<option name="USE_DOUBLE_QUOTES" value="false" />
<option name="FORCE_QUOTE_STYlE" value="true" />
<option name="ENFORCE_TRAILING_COMMA" value="Remove" />
<option name="SPACES_WITHIN_OBJECT_LITERAL_BRACES" value="true" />

6
.idea/misc.xml Normal file
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="JavaScriptSettings">
<option name="languageLevel" value="FLOW" />
</component>
</project>

View File

@ -1,12 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.cs.allow-jit</key>
<true/>
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
<true/>
<key>com.apple.security.cs.allow-dyld-environment-variables</key>
<true/>
</dict>
</plist>

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 121 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

BIN
dist/.icon-ico/icon.ico vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

229
dist/builder-debug.yml vendored Normal file
View File

@ -0,0 +1,229 @@
x64:
firstOrDefaultFilePatterns:
- '**/*'
- '!**/node_modules'
- '!build{,/**/*}'
- '!dist{,/**/*}'
- '!**/.vscode/*'
- '!src/*'
- '!electron.vite.config.{js,ts,mjs,cjs}'
- '!{.eslintignore,.eslintrc.cjs,.prettierignore,.prettierrc.yaml,dev-app-update.yml,CHANGELOG.md,README.md}'
- '!{.env,.env.*,.npmrc,pnpm-lock.yaml}'
- '!**/*.{iml,hprof,orig,pyc,pyo,rbc,swp,csproj,sln,suo,xproj,cc,d.ts,mk,a,o,forge-meta,pdb}'
- '!**/._*'
- '!**/electron-builder.{yaml,yml,json,json5,toml,ts}'
- '!**/{.git,.hg,.svn,CVS,RCS,SCCS,__pycache__,.DS_Store,thumbs.db,.gitignore,.gitkeep,.gitattributes,.npmignore,.idea,.vs,.flowconfig,.jshintrc,.eslintrc,.circleci,.yarn-integrity,.yarn-metadata.json,yarn-error.log,yarn.lock,package-lock.json,npm-debug.log,appveyor.yml,.travis.yml,circle.yml,.nyc_output,.husky,.github,electron-builder.env}'
- '!.yarn{,/**/*}'
- '!.editorconfig'
- '!.yarnrc.yml'
nodeModuleFilePatterns:
- '**/*'
- '!**/.vscode/*'
- '!src/*'
- '!electron.vite.config.{js,ts,mjs,cjs}'
- '!{.eslintignore,.eslintrc.cjs,.prettierignore,.prettierrc.yaml,dev-app-update.yml,CHANGELOG.md,README.md}'
- '!{.env,.env.*,.npmrc,pnpm-lock.yaml}'
nsis:
script: |-
!include "F:\pc\gateway-ui\node_modules\app-builder-lib\templates\nsis\include\StdUtils.nsh"
!addincludedir "F:\pc\gateway-ui\node_modules\app-builder-lib\templates\nsis\include"
!macro _isUpdated _a _b _t _f
${StdUtils.TestParameter} $R9 "updated"
StrCmp "$R9" "true" `${_t}` `${_f}`
!macroend
!define isUpdated `"" isUpdated ""`
!macro _isForceRun _a _b _t _f
${StdUtils.TestParameter} $R9 "force-run"
StrCmp "$R9" "true" `${_t}` `${_f}`
!macroend
!define isForceRun `"" isForceRun ""`
!macro _isKeepShortcuts _a _b _t _f
${StdUtils.TestParameter} $R9 "keep-shortcuts"
StrCmp "$R9" "true" `${_t}` `${_f}`
!macroend
!define isKeepShortcuts `"" isKeepShortcuts ""`
!macro _isNoDesktopShortcut _a _b _t _f
${StdUtils.TestParameter} $R9 "no-desktop-shortcut"
StrCmp "$R9" "true" `${_t}` `${_f}`
!macroend
!define isNoDesktopShortcut `"" isNoDesktopShortcut ""`
!macro _isDeleteAppData _a _b _t _f
${StdUtils.TestParameter} $R9 "delete-app-data"
StrCmp "$R9" "true" `${_t}` `${_f}`
!macroend
!define isDeleteAppData `"" isDeleteAppData ""`
!macro _isForAllUsers _a _b _t _f
${StdUtils.TestParameter} $R9 "allusers"
StrCmp "$R9" "true" `${_t}` `${_f}`
!macroend
!define isForAllUsers `"" isForAllUsers ""`
!macro _isForCurrentUser _a _b _t _f
${StdUtils.TestParameter} $R9 "currentuser"
StrCmp "$R9" "true" `${_t}` `${_f}`
!macroend
!define isForCurrentUser `"" isForCurrentUser ""`
!macro addLangs
!insertmacro MUI_LANGUAGE "English"
!insertmacro MUI_LANGUAGE "German"
!insertmacro MUI_LANGUAGE "French"
!insertmacro MUI_LANGUAGE "SpanishInternational"
!insertmacro MUI_LANGUAGE "SimpChinese"
!insertmacro MUI_LANGUAGE "TradChinese"
!insertmacro MUI_LANGUAGE "Japanese"
!insertmacro MUI_LANGUAGE "Korean"
!insertmacro MUI_LANGUAGE "Italian"
!insertmacro MUI_LANGUAGE "Dutch"
!insertmacro MUI_LANGUAGE "Danish"
!insertmacro MUI_LANGUAGE "Swedish"
!insertmacro MUI_LANGUAGE "Norwegian"
!insertmacro MUI_LANGUAGE "Finnish"
!insertmacro MUI_LANGUAGE "Russian"
!insertmacro MUI_LANGUAGE "Portuguese"
!insertmacro MUI_LANGUAGE "PortugueseBR"
!insertmacro MUI_LANGUAGE "Polish"
!insertmacro MUI_LANGUAGE "Ukrainian"
!insertmacro MUI_LANGUAGE "Czech"
!insertmacro MUI_LANGUAGE "Slovak"
!insertmacro MUI_LANGUAGE "Hungarian"
!insertmacro MUI_LANGUAGE "Arabic"
!insertmacro MUI_LANGUAGE "Turkish"
!insertmacro MUI_LANGUAGE "Thai"
!insertmacro MUI_LANGUAGE "Vietnamese"
!macroend
!addplugindir /x86-unicode "C:\Users\Administrator\AppData\Local\electron-builder\Cache\nsis\nsis-resources-3.4.1\plugins\x86-unicode"
!include "C:\Users\Administrator\AppData\Local\Temp\t-5mIwn8\0-messages.nsh"
!include "C:\Users\Administrator\AppData\Local\Temp\t-5mIwn8\1-messages.nsh"
Var newStartMenuLink
Var oldStartMenuLink
Var newDesktopLink
Var oldDesktopLink
Var oldShortcutName
Var oldMenuDirectory
!include "common.nsh"
!include "MUI2.nsh"
!include "multiUser.nsh"
!include "allowOnlyOneInstallerInstance.nsh"
!ifdef INSTALL_MODE_PER_ALL_USERS
!ifdef BUILD_UNINSTALLER
RequestExecutionLevel user
!else
RequestExecutionLevel admin
!endif
!else
RequestExecutionLevel user
!endif
!ifdef BUILD_UNINSTALLER
SilentInstall silent
!else
Var appExe
Var launchLink
!endif
!ifdef ONE_CLICK
!include "oneClick.nsh"
!else
!include "assistedInstaller.nsh"
!endif
!insertmacro addLangs
!ifmacrodef customHeader
!insertmacro customHeader
!endif
Function .onInit
Call setInstallSectionSpaceRequired
SetOutPath $INSTDIR
${LogSet} on
!ifmacrodef preInit
!insertmacro preInit
!endif
!ifdef DISPLAY_LANG_SELECTOR
!insertmacro MUI_LANGDLL_DISPLAY
!endif
!ifdef BUILD_UNINSTALLER
WriteUninstaller "${UNINSTALLER_OUT_FILE}"
!insertmacro quitSuccess
!else
!insertmacro check64BitAndSetRegView
!ifdef ONE_CLICK
!insertmacro ALLOW_ONLY_ONE_INSTALLER_INSTANCE
!else
${IfNot} ${UAC_IsInnerInstance}
!insertmacro ALLOW_ONLY_ONE_INSTALLER_INSTANCE
${EndIf}
!endif
!insertmacro initMultiUser
!ifmacrodef customInit
!insertmacro customInit
!endif
!ifmacrodef addLicenseFiles
InitPluginsDir
!insertmacro addLicenseFiles
!endif
!endif
FunctionEnd
!ifndef BUILD_UNINSTALLER
!include "installUtil.nsh"
!endif
Section "install" INSTALL_SECTION_ID
!ifndef BUILD_UNINSTALLER
# If we're running a silent upgrade of a per-machine installation, elevate so extracting the new app will succeed.
# For a non-silent install, the elevation will be triggered when the install mode is selected in the UI,
# but that won't be executed when silent.
!ifndef INSTALL_MODE_PER_ALL_USERS
!ifndef ONE_CLICK
${if} $hasPerMachineInstallation == "1" # set in onInit by initMultiUser
${andIf} ${Silent}
${ifNot} ${UAC_IsAdmin}
ShowWindow $HWNDPARENT ${SW_HIDE}
!insertmacro UAC_RunElevated
${Switch} $0
${Case} 0
${Break}
${Case} 1223 ;user aborted
${Break}
${Default}
MessageBox mb_IconStop|mb_TopMost|mb_SetForeground "Unable to elevate, error $0"
${Break}
${EndSwitch}
Quit
${else}
!insertmacro setInstallModePerAllUsers
${endIf}
${endIf}
!endif
!endif
!include "installSection.nsh"
!endif
SectionEnd
Function setInstallSectionSpaceRequired
!insertmacro setSpaceRequired ${INSTALL_SECTION_ID}
FunctionEnd
!ifdef BUILD_UNINSTALLER
!include "uninstaller.nsh"
!endif

56
dist/builder-effective-config.yaml vendored Normal file
View File

@ -0,0 +1,56 @@
directories:
output: dist
buildResources: build
appId: com.electron.app
productName: 谷云工具
files:
- filter:
- '!**/.vscode/*'
- '!src/*'
- '!electron.vite.config.{js,ts,mjs,cjs}'
- '!{.eslintignore,.eslintrc.cjs,.prettierignore,.prettierrc.yaml,dev-app-update.yml,CHANGELOG.md,README.md}'
- '!{.env,.env.*,.npmrc,pnpm-lock.yaml}'
asarUnpack:
- resources/**
win:
icon: resources/icon.png
nsis:
artifactName: ${productName}-${version}-setup.${ext}
shortcutName: ${productName}
uninstallDisplayName: ${productName}
createDesktopShortcut: always
allowToChangeInstallationDirectory: true
oneClick: false
installerIcon: resources/icon.ico
uninstallerIcon: resources/icon.ico
installerHeader: resources/icon.png
installerHeaderIcon: resources/icon.png
mac:
entitlementsInherit: build/entitlements.mac.plist
extendInfo:
- NSCameraUsageDescription: Application requests access to the device's camera.
- NSMicrophoneUsageDescription: Application requests access to the device's microphone.
- NSDocumentsFolderUsageDescription: Application requests access to the user's Documents folder.
- NSDownloadsFolderUsageDescription: Application requests access to the user's Downloads folder.
notarize: false
icon: resources/icon.png
identity: null
dmg:
artifactName: ${name}-${version}.${ext}
linux:
target:
- AppImage
- snap
- deb
maintainer: electronjs.org
category: Utility
icon: resources/icon.png
appImage:
artifactName: ${name}-${version}.${ext}
npmRebuild: false
publish:
provider: generic
url: https://example.com/auto-updates
electronDownload:
mirror: https://npmmirror.com/mirrors/electron/
electronVersion: 31.1.0

8
dist/latest.yml vendored Normal file
View File

@ -0,0 +1,8 @@
version: 1.0.0
files:
- url: 谷云工具-1.0.0-setup.exe
sha512: 1aL/ryIrS8KCW3sDeuBFsMe62PPBXepWhL1voLPJ1RvIwnZOKIlr2QtutorUmWiT7SxmmD27iuSQm5BWOnqphg==
size: 106215154
path: 谷云工具-1.0.0-setup.exe
sha512: 1aL/ryIrS8KCW3sDeuBFsMe62PPBXepWhL1voLPJ1RvIwnZOKIlr2QtutorUmWiT7SxmmD27iuSQm5BWOnqphg==
releaseDate: '2024-07-12T08:13:19.231Z'

21
dist/win-unpacked/LICENSE.electron.txt vendored Normal file
View File

@ -0,0 +1,21 @@
Copyright (c) Electron contributors
Copyright (c) 2013-2020 GitHub Inc.
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

170109
dist/win-unpacked/LICENSES.chromium.html vendored Normal file

File diff suppressed because it is too large Load Diff

BIN
dist/win-unpacked/chrome_100_percent.pak vendored Normal file

Binary file not shown.

BIN
dist/win-unpacked/chrome_200_percent.pak vendored Normal file

Binary file not shown.

BIN
dist/win-unpacked/d3dcompiler_47.dll vendored Normal file

Binary file not shown.

BIN
dist/win-unpacked/ffmpeg.dll vendored Normal file

Binary file not shown.

BIN
dist/win-unpacked/icudtl.dat vendored Normal file

Binary file not shown.

BIN
dist/win-unpacked/libEGL.dll vendored Normal file

Binary file not shown.

BIN
dist/win-unpacked/libGLESv2.dll vendored Normal file

Binary file not shown.

BIN
dist/win-unpacked/locales/af.pak vendored Normal file

Binary file not shown.

BIN
dist/win-unpacked/locales/am.pak vendored Normal file

Binary file not shown.

BIN
dist/win-unpacked/locales/ar.pak vendored Normal file

Binary file not shown.

BIN
dist/win-unpacked/locales/bg.pak vendored Normal file

Binary file not shown.

BIN
dist/win-unpacked/locales/bn.pak vendored Normal file

Binary file not shown.

BIN
dist/win-unpacked/locales/ca.pak vendored Normal file

Binary file not shown.

BIN
dist/win-unpacked/locales/cs.pak vendored Normal file

Binary file not shown.

BIN
dist/win-unpacked/locales/da.pak vendored Normal file

Binary file not shown.

BIN
dist/win-unpacked/locales/de.pak vendored Normal file

Binary file not shown.

BIN
dist/win-unpacked/locales/el.pak vendored Normal file

Binary file not shown.

BIN
dist/win-unpacked/locales/en-GB.pak vendored Normal file

Binary file not shown.

BIN
dist/win-unpacked/locales/en-US.pak vendored Normal file

Binary file not shown.

BIN
dist/win-unpacked/locales/es-419.pak vendored Normal file

Binary file not shown.

BIN
dist/win-unpacked/locales/es.pak vendored Normal file

Binary file not shown.

BIN
dist/win-unpacked/locales/et.pak vendored Normal file

Binary file not shown.

BIN
dist/win-unpacked/locales/fa.pak vendored Normal file

Binary file not shown.

BIN
dist/win-unpacked/locales/fi.pak vendored Normal file

Binary file not shown.

BIN
dist/win-unpacked/locales/fil.pak vendored Normal file

Binary file not shown.

BIN
dist/win-unpacked/locales/fr.pak vendored Normal file

Binary file not shown.

BIN
dist/win-unpacked/locales/gu.pak vendored Normal file

Binary file not shown.

BIN
dist/win-unpacked/locales/he.pak vendored Normal file

Binary file not shown.

BIN
dist/win-unpacked/locales/hi.pak vendored Normal file

Binary file not shown.

BIN
dist/win-unpacked/locales/hr.pak vendored Normal file

Binary file not shown.

BIN
dist/win-unpacked/locales/hu.pak vendored Normal file

Binary file not shown.

BIN
dist/win-unpacked/locales/id.pak vendored Normal file

Binary file not shown.

BIN
dist/win-unpacked/locales/it.pak vendored Normal file

Binary file not shown.

BIN
dist/win-unpacked/locales/ja.pak vendored Normal file

Binary file not shown.

BIN
dist/win-unpacked/locales/kn.pak vendored Normal file

Binary file not shown.

BIN
dist/win-unpacked/locales/ko.pak vendored Normal file

Binary file not shown.

BIN
dist/win-unpacked/locales/lt.pak vendored Normal file

Binary file not shown.

BIN
dist/win-unpacked/locales/lv.pak vendored Normal file

Binary file not shown.

BIN
dist/win-unpacked/locales/ml.pak vendored Normal file

Binary file not shown.

BIN
dist/win-unpacked/locales/mr.pak vendored Normal file

Binary file not shown.

BIN
dist/win-unpacked/locales/ms.pak vendored Normal file

Binary file not shown.

BIN
dist/win-unpacked/locales/nb.pak vendored Normal file

Binary file not shown.

BIN
dist/win-unpacked/locales/nl.pak vendored Normal file

Binary file not shown.

BIN
dist/win-unpacked/locales/pl.pak vendored Normal file

Binary file not shown.

BIN
dist/win-unpacked/locales/pt-BR.pak vendored Normal file

Binary file not shown.

BIN
dist/win-unpacked/locales/pt-PT.pak vendored Normal file

Binary file not shown.

BIN
dist/win-unpacked/locales/ro.pak vendored Normal file

Binary file not shown.

BIN
dist/win-unpacked/locales/ru.pak vendored Normal file

Binary file not shown.

BIN
dist/win-unpacked/locales/sk.pak vendored Normal file

Binary file not shown.

BIN
dist/win-unpacked/locales/sl.pak vendored Normal file

Binary file not shown.

BIN
dist/win-unpacked/locales/sr.pak vendored Normal file

Binary file not shown.

BIN
dist/win-unpacked/locales/sv.pak vendored Normal file

Binary file not shown.

BIN
dist/win-unpacked/locales/sw.pak vendored Normal file

Binary file not shown.

BIN
dist/win-unpacked/locales/ta.pak vendored Normal file

Binary file not shown.

BIN
dist/win-unpacked/locales/te.pak vendored Normal file

Binary file not shown.

BIN
dist/win-unpacked/locales/th.pak vendored Normal file

Binary file not shown.

BIN
dist/win-unpacked/locales/tr.pak vendored Normal file

Binary file not shown.

BIN
dist/win-unpacked/locales/uk.pak vendored Normal file

Binary file not shown.

BIN
dist/win-unpacked/locales/ur.pak vendored Normal file

Binary file not shown.

BIN
dist/win-unpacked/locales/vi.pak vendored Normal file

Binary file not shown.

BIN
dist/win-unpacked/locales/zh-CN.pak vendored Normal file

Binary file not shown.

BIN
dist/win-unpacked/locales/zh-TW.pak vendored Normal file

Binary file not shown.

BIN
dist/win-unpacked/resources.pak vendored Normal file

Binary file not shown.

View File

@ -0,0 +1,3 @@
provider: generic
url: https://example.com/auto-updates
updaterCacheDirName: gateway-app-updater

BIN
dist/win-unpacked/resources/app.asar vendored Normal file

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

View File

@ -0,0 +1,35 @@
server:
address: ":8000"
openapiPath: "/api.json"
swaggerPath: "/swagger"
logger:
level : "all"
stdout: true
path: "logs"
# GRPC Server.
grpc:
address: ""
name: "demo"
logPath: ""
logStdout: true
errorStack: true
errorLogEnabled: true
errorLogPattern: "error-{Ymd}.log"
accessLogEnabled: true
accessLogPattern: "access-{Ymd}.log"
# Database.
database:
logger:
level: "all"
stdout: true
default:
link: "mysql:root:12345678@tcp(127.0.0.1:3306)/test"
debug: true
plugin:
path: "./plugins"

View File

@ -0,0 +1,3 @@
张三
Written from plugin-test-grpc

BIN
dist/win-unpacked/resources/elevate.exe vendored Normal file

Binary file not shown.

BIN
dist/win-unpacked/snapshot_blob.bin vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
dist/win-unpacked/vk_swiftshader.dll vendored Normal file

Binary file not shown.

View File

@ -0,0 +1 @@
{"file_format_version": "1.0.0", "ICD": {"library_path": ".\\vk_swiftshader.dll", "api_version": "1.0.5"}}

BIN
dist/win-unpacked/vulkan-1.dll vendored Normal file

Binary file not shown.

BIN
dist/win-unpacked/谷云工具.exe vendored Normal file

Binary file not shown.

BIN
dist/谷云工具-1.0.0-setup.exe vendored Normal file

Binary file not shown.

Binary file not shown.

View File

@ -1,44 +1,67 @@
# 应用程序的唯一标识符
appId: com.electron.app
productName: gateway-ui
# 应用程序的名称
productName: 谷云工具
# 定义构建资源和输出文件的目录
directories:
buildResources: build
# 定义要包含或排除在构建输出中的文件
files:
- '!**/.vscode/*'
- '!src/*'
- '!electron.vite.config.{js,ts,mjs,cjs}'
- '!{.eslintignore,.eslintrc.cjs,.prettierignore,.prettierrc.yaml,dev-app-update.yml,CHANGELOG.md,README.md}'
- '!{.env,.env.*,.npmrc,pnpm-lock.yaml}'
- '!**/.vscode/*' # 排除VSCode配置文件
- '!src/*' # 排除源代码目录
- '!electron.vite.config.{js,ts,mjs,cjs}' # 排除Electron构建配置文件
- '!{.eslintignore,.eslintrc.cjs,.prettierignore,.prettierrc.yaml,dev-app-update.yml,CHANGELOG.md,README.md}' # 排除开发和文档文件
- '!{.env,.env.*,.npmrc,pnpm-lock.yaml}' # 排除环境和包管理配置文件
# 定义需要解压的asar文件
asarUnpack:
- resources/**
- resources/** # 解压资源目录下的所有文件
# 针对Windows平台的配置
win:
executableName: gateway-ui
icon: resources/icon.png # 应用程序图标的路径
# 针对NSIS安装程序的配置
nsis:
artifactName: ${name}-${version}-setup.${ext}
shortcutName: ${productName}
uninstallDisplayName: ${productName}
createDesktopShortcut: always
artifactName: ${productName}-${version}-setup.${ext} # 安装程序的文件名格式
shortcutName: ${productName} # 快捷方式的名称
uninstallDisplayName: ${productName} # 卸载程序显示的名称
createDesktopShortcut: always # 总是在桌面创建快捷方式
allowToChangeInstallationDirectory: true # 允许用户选择安装目录
oneClick: false # 设置为非一键安装
installerIcon: resources/icon.ico # 安装程序的图标
uninstallerIcon: resources/icon.ico # 卸载程序的图标
installerHeader: resources/icon.png # 安装程序头部的图像
installerHeaderIcon: resources/icon.png # 安装程序头部图标的路径
# 针对macOS平台的配置
mac:
entitlementsInherit: build/entitlements.mac.plist
extendInfo:
- NSCameraUsageDescription: Application requests access to the device's camera.
- NSMicrophoneUsageDescription: Application requests access to the device's microphone.
- NSDocumentsFolderUsageDescription: Application requests access to the user's Documents folder.
- NSDownloadsFolderUsageDescription: Application requests access to the user's Downloads folder.
notarize: false
entitlementsInherit: build/entitlements.mac.plist # 继承权限配置文件
extendInfo: # 添加macOS应用的元数据
- NSCameraUsageDescription: Application requests access to the device's camera. # 摄像头使用权限描述
- NSMicrophoneUsageDescription: Application requests access to the device's microphone. # 麦克风使用权限描述
- NSDocumentsFolderUsageDescription: Application requests access to the user's Documents folder. # 文档夹使用权限描述
- NSDownloadsFolderUsageDescription: Application requests access to the user's Downloads folder. # 下载夹使用权限描述
notarize: false # 是否进行苹果的公证
icon: resources/icon.png # 应用程序的图标路径
identity: null # 签名身份
# 针对dmg安装包的配置
dmg:
artifactName: ${name}-${version}.${ext}
artifactName: ${name}-${version}.${ext} # dmg文件的命名格式
# 针对Linux平台的配置
linux:
target:
target: # 目标包类型
- AppImage
- snap
- deb
maintainer: electronjs.org
category: Utility
maintainer: electronjs.org # 维护者信息
category: Utility # 应用程序类别
icon: resources/icon.png # 应用程序图标路径
# 针对AppImage包的配置
appImage:
artifactName: ${name}-${version}.${ext}
artifactName: ${name}-${version}.${ext} # AppImage文件的命名格式
# 是否在npm安装时重建asar包
npmRebuild: false
# 配置自动更新的信息
publish:
provider: generic
url: https://example.com/auto-updates
provider: generic # 更新服务提供者
url: https://example.com/auto-updates # 更新信息的URL
# 配置Electron下载的镜像地址
electronDownload:
mirror: https://npmmirror.com/mirrors/electron/
mirror: https://npmmirror.com/mirrors/electron/ # Electron下载的镜像地址

View File

@ -1,5 +1,5 @@
{
"name": "gateway-ui",
"name": "gateway-app",
"version": "1.0.0",
"description": "An Electron application with Vue",
"main": "./out/main/index.js",
@ -21,6 +21,7 @@
"@electron-toolkit/preload": "^3.0.1",
"@electron-toolkit/utils": "^3.0.0",
"axios": "^1.7.2",
"dayjs": "^1.11.11",
"electron-updater": "^6.1.7",
"element-plus": "^2.7.6",
"pinia": "^2.1.7",
@ -36,7 +37,9 @@
"electron-vite": "^2.3.0",
"eslint": "^8.57.0",
"eslint-plugin-vue": "^9.26.0",
"less": "^4.2.0",
"prettier": "^3.3.2",
"sass": "^1.77.6",
"vite": "^5.3.1",
"vue": "^3.4.30"
}

BIN
resources/icon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

After

Width:  |  Height:  |  Size: 45 KiB

View File

@ -0,0 +1,35 @@
server:
address: ":8000"
openapiPath: "/api.json"
swaggerPath: "/swagger"
logger:
level : "all"
stdout: true
path: "logs"
# GRPC Server.
grpc:
address: ""
name: "demo"
logPath: ""
logStdout: true
errorStack: true
errorLogEnabled: true
errorLogPattern: "error-{Ymd}.log"
accessLogEnabled: true
accessLogPattern: "access-{Ymd}.log"
# Database.
database:
logger:
level: "all"
stdout: true
default:
link: "mysql:root:12345678@tcp(127.0.0.1:3306)/test"
debug: true
plugin:
path: "./plugins"

Binary file not shown.

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More