Commit 0a12916a authored by wuhao's avatar wuhao 🎯

adder

parent c77d166b
No preview for this file type
# EE框架 v3
[![star](https://gitee.com/dromara/electron-egg/badge/star.svg?theme=gvp)](https://gitee.com/dromara/electron-egg/stargazers) [![star](https://gitee.com/dromara/electron-egg/badge/star.svg?theme=gvp)](https://gitee.com/dromara/electron-egg/stargazers)
<div align=center> <div align=center>
<h3>🎉🎉🎉 框架下载量突破10万+ 🎉🎉🎉</h3> <h3>🎉🎉🎉 ElectronEgg V3.7.0已发布! 🎉🎉🎉</h3>
</div> </div>
<br> <br>
...@@ -15,19 +14,22 @@ ...@@ -15,19 +14,22 @@
</div> </div>
<br> <br>
## 🌏 [English](https://www.yuque.com/u34495/ee-doc) | [中文](https://www.kaka996.com/) <!-- ## 🌏 [English](https://www.yuque.com/u34495/ee-doc) | [中文](https://www.kaka996.com/) -->
## 📋 介绍 ## 📋 介绍
#### 框架已经广泛应用于记账、政务、企业、医疗、学校、股票交易、ERP、娱乐、视频等领域客户端,请放心使用!
- 🍩 **为什么使用?** 桌面软件(办公方向、 个人工具),仍然是未来十几年PC端需求之一,提高工作效率 - 🍩 **为什么使用?** 桌面软件(办公方向、 个人工具),仍然是未来十几年PC端需求之一,提高工作效率
- 🍉 **简单:** 只需懂 JavaScript - 🍉 **简单:** 只需懂 JavaScript
- 🍑 **愿景:** 所有开发者都能学会桌面软件研发 - 🍑 **愿景:** 所有开发者都能学会桌面软件研发
- 🍰 **gitee:** https://gitee.com/dromara/electron-egg **3400+** - 🍰 **gitee:** https://gitee.com/dromara/electron-egg **3700+**
- 🍨 **github:** https://github.com/dromara/electron-egg **900+** - 🍨 **github:** https://github.com/dromara/electron-egg **1000+**
- 🏆 码云最有价值开源项目 - 🏆 码云最有价值开源项目
![](https://wallace5303.gitee.io/ee/images/electron-egg/ee-zs.png) ![](https://wallace5303.gitee.io/ee/images/electron-egg/ee-zs.png)
## 📚 文档 ## 📚 文档
- [教程文档](https://www.kaka996.com/) - 快速体验:[教程文档](https://www.kaka996.com/)
![](https://wallace5303.gitee.io/ee/images/electron-egg/v3-home.png)
## 📦 特性 ## 📦 特性
1. 🍄 跨平台:一套代码,可以打包成windows版、Mac版、Linux版、国产UOS、Deepin、麒麟等 1. 🍄 跨平台:一套代码,可以打包成windows版、Mac版、Linux版、国产UOS、Deepin、麒麟等
...@@ -76,7 +78,10 @@ ...@@ -76,7 +78,10 @@
- ✒️ [安装文档](https://www.kaka996.com/pages/e64ff6/) - ✒️ [安装文档](https://www.kaka996.com/pages/e64ff6/)
## 🐶 项目案例 ## 🐶 项目案例
- 🐟 EE框架已经应用于医疗、学校、政务、股票交易、ERP、娱乐、视频、企业等领域客户端 - 🐟 框架已经应用于医疗、学校、政务、股票交易、ERP、娱乐、视频、企业等领域客户端
- 🐸 壁纸
![](https://wallace5303.gitee.io/ee/images/electron-egg/aw/aw-3.png)
- 🐸 英雄联盟助手 - 🐸 英雄联盟助手
![](https://wallace5303.gitee.io/ee/images/electron-egg/serendipity/lol-zhanji.png) ![](https://wallace5303.gitee.io/ee/images/electron-egg/serendipity/lol-zhanji.png)
......
# EE框架 v3
[![star](https://gitee.com/dromara/electron-egg/badge/star.svg?theme=gvp)](https://gitee.com/dromara/electron-egg/stargazers) [![star](https://gitee.com/dromara/electron-egg/badge/star.svg?theme=gvp)](https://gitee.com/dromara/electron-egg/stargazers)
<div align=center> <div align=center>
<h3>🎉🎉🎉 框架下载量突破10万+ 🎉🎉🎉</h3> <h3>🎉🎉🎉 ElectronEgg V3.7.0已发布! 🎉🎉🎉</h3>
</div> </div>
<br> <br>
...@@ -15,19 +14,22 @@ ...@@ -15,19 +14,22 @@
</div> </div>
<br> <br>
## 🌏 [English](https://www.yuque.com/u34495/ee-doc) | [中文](https://www.kaka996.com/) <!-- ## 🌏 [English](https://www.yuque.com/u34495/ee-doc) | [中文](https://www.kaka996.com/) -->
## 📋 介绍 ## 📋 介绍
#### 框架已经广泛应用于记账、政务、企业、医疗、学校、股票交易、ERP、娱乐、视频等领域客户端,请放心使用!
- 🍩 **为什么使用?** 桌面软件(办公方向、 个人工具),仍然是未来十几年PC端需求之一,提高工作效率 - 🍩 **为什么使用?** 桌面软件(办公方向、 个人工具),仍然是未来十几年PC端需求之一,提高工作效率
- 🍉 **简单:** 只需懂 JavaScript - 🍉 **简单:** 只需懂 JavaScript
- 🍑 **愿景:** 所有开发者都能学会桌面软件研发 - 🍑 **愿景:** 所有开发者都能学会桌面软件研发
- 🍰 **gitee:** https://gitee.com/dromara/electron-egg **3400+** - 🍰 **gitee:** https://gitee.com/dromara/electron-egg **3700+**
- 🍨 **github:** https://github.com/dromara/electron-egg **900+** - 🍨 **github:** https://github.com/dromara/electron-egg **1000+**
- 🏆 码云最有价值开源项目 - 🏆 码云最有价值开源项目
![](https://wallace5303.gitee.io/ee/images/electron-egg/ee-zs.png) ![](https://wallace5303.gitee.io/ee/images/electron-egg/ee-zs.png)
## 📚 文档 ## 📚 文档
- [教程文档](https://www.kaka996.com/) - 快速体验:[教程文档](https://www.kaka996.com/)
![](https://wallace5303.gitee.io/ee/images/electron-egg/v3-home.png)
## 📦 特性 ## 📦 特性
1. 🍄 跨平台:一套代码,可以打包成windows版、Mac版、Linux版、国产UOS、Deepin、麒麟等 1. 🍄 跨平台:一套代码,可以打包成windows版、Mac版、Linux版、国产UOS、Deepin、麒麟等
...@@ -76,7 +78,10 @@ ...@@ -76,7 +78,10 @@
- ✒️ [安装文档](https://www.kaka996.com/pages/e64ff6/) - ✒️ [安装文档](https://www.kaka996.com/pages/e64ff6/)
## 🐶 项目案例 ## 🐶 项目案例
- 🐟 EE框架已经应用于医疗、学校、政务、股票交易、ERP、娱乐、视频、企业等领域客户端 - 🐟 框架已经应用于医疗、学校、政务、股票交易、ERP、娱乐、视频、企业等领域客户端
- 🐸 壁纸
![](https://wallace5303.gitee.io/ee/images/electron-egg/aw/aw-3.png)
- 🐸 英雄联盟助手 - 🐸 英雄联盟助手
![](https://wallace5303.gitee.io/ee/images/electron-egg/serendipity/lol-zhanji.png) ![](https://wallace5303.gitee.io/ee/images/electron-egg/serendipity/lol-zhanji.png)
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
"cache": { "cache": {
"config": { "config": {
"env": "local", "env": "local",
"name": "standaloneframe", "name": "ee",
"baseDir": "/Users/wuhao/Desktop/demos/standaloneframe/electron", "baseDir": "/Users/wuhao/Desktop/demos/standaloneframe/electron",
"HOME": "/Users/wuhao/Desktop/demos/standaloneframe", "HOME": "/Users/wuhao/Desktop/demos/standaloneframe",
"rundir": "/Users/wuhao/Desktop/demos/standaloneframe/electron/run", "rundir": "/Users/wuhao/Desktop/demos/standaloneframe/electron/run",
...@@ -11,9 +11,9 @@ ...@@ -11,9 +11,9 @@
}, },
"homeDir": "/Users/wuhao/Desktop/demos/standaloneframe", "homeDir": "/Users/wuhao/Desktop/demos/standaloneframe",
"root": "/Users/wuhao/Desktop/demos/standaloneframe", "root": "/Users/wuhao/Desktop/demos/standaloneframe",
"appUserDataDir": "/Users/wuhao/Library/Application Support/standaloneframe", "appUserDataDir": "/Users/wuhao/Library/Application Support/ee",
"userHome": "/Users/wuhao", "userHome": "/Users/wuhao",
"appVersion": "3.4.0", "appVersion": "3.7.0",
"isPackaged": false, "isPackaged": false,
"execDir": "/Users/wuhao/Desktop/demos/standaloneframe", "execDir": "/Users/wuhao/Desktop/demos/standaloneframe",
"logger": { "logger": {
...@@ -57,17 +57,17 @@ ...@@ -57,17 +57,17 @@
} }
}, },
"developmentMode": { "developmentMode": {
"default": "react", "default": "vue",
"mode": { "mode": {
"vue": { "vue": {
"protocol": "http://", "protocol": "http://",
"hostname": "localhost", "hostname": "localhost",
"port": 4399 "port": 8080
}, },
"react": { "react": {
"protocol": "http://", "protocol": "http://",
"hostname": "localhost", "hostname": "localhost",
"port": 8000 "port": 3000
}, },
"html": { "html": {
"protocol": "http://", "protocol": "http://",
...@@ -93,7 +93,7 @@ ...@@ -93,7 +93,7 @@
} }
}, },
"httpServer": { "httpServer": {
"enable": true, "enable": false,
"https": { "https": {
"enable": false, "enable": false,
"key": "/public/ssl/localhost+1.key", "key": "/public/ssl/localhost+1.key",
...@@ -103,9 +103,7 @@ ...@@ -103,9 +103,7 @@
"host": "localhost", "host": "localhost",
"port": 7071, "port": 7071,
"cors": { "cors": {
"origin": false, "origin": "*"
"allowMethods": "GET,HEAD,PUT,POST,DELETE,PATCH,OPTIONS",
"credentials": true
}, },
"body": { "body": {
"multipart": true, "multipart": true,
...@@ -121,7 +119,7 @@ ...@@ -121,7 +119,7 @@
} }
}, },
"mainServer": { "mainServer": {
"protocol": "http://", "protocol": "file://",
"indexPath": "/public/dist/index.html", "indexPath": "/public/dist/index.html",
"host": "localhost", "host": "localhost",
"port": 7072, "port": 7072,
...@@ -131,7 +129,7 @@ ...@@ -131,7 +129,7 @@
"cert": "" "cert": ""
} }
}, },
"openAppMenu": "dev-show", "openAppMenu": true,
"hardGpu": { "hardGpu": {
"enable": false "enable": false
}, },
...@@ -146,7 +144,7 @@ ...@@ -146,7 +144,7 @@
"tray": { "tray": {
"enable": true, "enable": true,
"title": "EE程序", "title": "EE程序",
"icon": "/public/images/tray_logo.png" "icon": "/public/images/tray.png"
}, },
"security": { "security": {
"enable": true "enable": true
...@@ -180,7 +178,9 @@ ...@@ -180,7 +178,9 @@
"childExit": true, "childExit": true,
"rendererExit": true "rendererExit": true
}, },
"openDevTools": false, "openDevTools": {
"mode": "undocked"
},
"windowsOption": { "windowsOption": {
"title": "EE框架", "title": "EE框架",
"width": 980, "width": 980,
...@@ -188,6 +188,7 @@ ...@@ -188,6 +188,7 @@
"minWidth": 800, "minWidth": 800,
"minHeight": 650, "minHeight": 650,
"webPreferences": { "webPreferences": {
"webSecurity": false,
"contextIsolation": false, "contextIsolation": false,
"nodeIntegration": true "nodeIntegration": true
}, },
...@@ -199,9 +200,6 @@ ...@@ -199,9 +200,6 @@
"enable": false, "enable": false,
"url": "http://electron-egg.kaka996.com/" "url": "http://electron-egg.kaka996.com/"
}, },
"testConfig": {
"login": "http://local.com/api/login"
},
"coreMiddlewares": [], "coreMiddlewares": [],
"coreMiddleware": [], "coreMiddleware": [],
"appMiddlewares": [], "appMiddlewares": [],
......
...@@ -102,9 +102,12 @@ class AutoUpdaterAddon { ...@@ -102,9 +102,12 @@ class AutoUpdaterAddon {
info.status = status.downloaded; info.status = status.downloaded;
info.desc = '下载完成'; info.desc = '下载完成';
this.sendStatusToWindow(info); this.sendStatusToWindow(info);
// quit and update
// app.appQuit();
autoUpdater.quitAndInstall(); autoUpdater.quitAndInstall();
// const mainWindow = CoreWindow.getMainWindow();
// if (mainWindow) {
// mainWindow.destroy()
// }
// electronApp.appQuit()
}); });
} }
......
...@@ -45,7 +45,16 @@ class JavaServerAddon { ...@@ -45,7 +45,16 @@ class JavaServerAddon {
* @since 1.0.0 * @since 1.0.0
*/ */
async check () { async check () {
Log.info("进入-----检查服务是否启动------"+this.javaServer);
if(this.javaServer == undefined){
Log.info("[addon:javaServer:check] status-----------"+false);
return false;
}
const flag = await this.javaServer.isRun(Conf.getValue('addons.javaServer'));
Log.info("[addon:javaServer:check] status-----------"+flag);
return flag;
} }
/** /**
......
...@@ -95,6 +95,32 @@ class JavaServer { ...@@ -95,6 +95,32 @@ class JavaServer {
// todo linux // todo linux
} }
} }
/**
* 服务是否运行中
*/
async isRun(cfg){
const jarName = cfg.name;
if (is.windows()) {
const resultList = ps.lookup({
command: "java",
where: 'caption="javaw.exe"',
arguments: jarName,
});
Log.info("[addon:javaServer] resultList:", resultList);
return resultList.length>0;
} else if (is.macOS()) {
const cmd = `ps -ef | grep java | grep ${jarName} | grep -v grep | awk '{print $2}' `;
Log.info("[addon:javaServer:isRun] cmdStr:", cmd);
const result = execSync(cmd);
Log.info('[addon:javaServer:isRun] result:', result.toString());
//不等于空说明正在运行
return result.toString()!==""
} else {
// todo linux
}
}
} }
module.exports = JavaServer; module.exports = JavaServer;
\ No newline at end of file
const { Tray, Menu, shell } = require('electron'); const { Tray, Menu } = require('electron');
const path = require('path'); const path = require('path');
const Ps = require('ee-core/ps'); const Ps = require('ee-core/ps');
const Log = require('ee-core/log'); const Log = require('ee-core/log');
...@@ -62,12 +62,6 @@ class TrayAddon { ...@@ -62,12 +62,6 @@ class TrayAddon {
this.tray.setToolTip(cfg.title); this.tray.setToolTip(cfg.title);
const contextMenu = Menu.buildFromTemplate(trayMenuTemplate); const contextMenu = Menu.buildFromTemplate(trayMenuTemplate);
this.tray.setContextMenu(contextMenu); this.tray.setContextMenu(contextMenu);
// 使用默认浏览器打开链接
mainWindow.webContents.setWindowOpenHandler(({ url }) => {
shell.openExternal(url);
return { action: 'deny' }
})
} }
} }
......
/**
* ee-bin 配置
* 仅适用于开发环境
*/
module.exports = {
/**
* development serve ("frontend" "electron" )
* ee-bin dev
*/
dev: {
frontend: {
directory: './frontend',
cmd: 'npm',
args: ['run', 'dev'],
protocol: 'http://',
hostname: 'localhost',
port: 8080,
indexPath: 'index.html'
},
electron: {
directory: './',
cmd: 'electron',
args: ['.', '--env=local'],
}
},
/**
* 前端构建
* ee-bin build
*/
build: {
directory: './frontend',
cmd: 'npm',
args: ['run', 'build'],
},
/**
* 移动资源
* ee-bin rd
*/
rd: {
dist: './frontend/dist',
target: './public/dist'
},
/**
* 预发布模式(prod)
* ee-bin start
*/
start: {
directory: './',
cmd: 'electron',
args: ['.', '--env=prod']
},
/**
* 加密
*/
encrypt: {
type: 'confusion',
files: [
'electron/**/*.(js|json)',
'!electron/config/encrypt.js',
'!electron/config/nodemon.json',
'!electron/config/builder.json',
'!electron/config/bin.json',
],
fileExt: ['.js'],
confusionOptions: {
compact: true,
stringArray: true,
stringArrayEncoding: ['none'],
deadCodeInjection: false,
}
}
};
\ No newline at end of file
{ {
"productName": "standaloneframe", "productName": "ee",
"appId": "com.electron.ee", "appId": "com.electron.ee",
"copyright": "© 2023 哆啦好梦 Technology Co., Ltd.", "copyright": "© 2023 哆啦好梦 Technology Co., Ltd.",
"directories": { "directories": {
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
"installerHeaderIcon": "build/icons/icon.ico", "installerHeaderIcon": "build/icons/icon.ico",
"createDesktopShortcut": true, "createDesktopShortcut": true,
"createStartMenuShortcut": true, "createStartMenuShortcut": true,
"shortcutName": "制作器-单机版" "shortcutName": "EE框架"
}, },
"mac": { "mac": {
"icon": "build/icons/icon.icns", "icon": "build/icons/icon.icns",
......
"use strict"; 'use strict';
const path = require("path"); const path = require('path');
/** /**
* 默认配置 * 默认配置
*/ */
module.exports = (appInfo) => { module.exports = (appInfo) => {
const config = {};
/** const config = {};
* 应用模式配置
*/
config.developmentMode = {
default: "react",
mode: {
vue: {
hostname: "localhost",
port: 4399,
},
react: {
hostname: "localhost",
port: 8000,
},
html: {
hostname: "localhost",
indexPage: "index.html",
},
},
};
/** /**
* 开发者工具 * 开发者工具
...@@ -37,49 +17,49 @@ module.exports = (appInfo) => { ...@@ -37,49 +17,49 @@ module.exports = (appInfo) => {
/** /**
* 应用程序顶部菜单 * 应用程序顶部菜单
*/ */
config.openAppMenu = "dev-show"; config.openAppMenu = true;
/** /**
* 主窗口 * 主窗口
*/ */
config.windowsOption = { config.windowsOption = {
title: "EE框架", title: 'EE框架',
width: 980, width: 980,
height: 650, height: 650,
minWidth: 800, minWidth: 800,
minHeight: 650, minHeight: 650,
webPreferences: { webPreferences: {
//webSecurity: false, // 跨域问题 -> 打开注释 webSecurity: false,
contextIsolation: false, // false -> 可在渲染进程中使用electron的api,true->需要bridge.js(contextBridge) contextIsolation: false, // false -> 可在渲染进程中使用electron的api,true->需要bridge.js(contextBridge)
nodeIntegration: true, nodeIntegration: true,
//preload: path.join(appInfo.baseDir, 'preload', 'bridge.js'), //preload: path.join(appInfo.baseDir, 'preload', 'bridge.js'),
}, },
frame: true, frame: true,
show: false, show: false,
icon: path.join(appInfo.home, "public", "images", "logo-32.png"), icon: path.join(appInfo.home, 'public', 'images', 'logo-32.png'),
}; };
/** /**
* ee框架日志 * ee框架日志
*/ */
config.logger = { config.logger = {
encoding: "utf8", encoding: 'utf8',
level: "INFO", level: 'INFO',
outputJSON: false, outputJSON: false,
buffer: true, buffer: true,
enablePerformanceTimer: false, enablePerformanceTimer: false,
rotator: "day", rotator: 'day',
appLogName: "ee.log", appLogName: 'ee.log',
coreLogName: "ee-core.log", coreLogName: 'ee-core.log',
errorLogName: "ee-error.log", errorLogName: 'ee-error.log'
}; }
/** /**
* 远程模式-web地址 * 远程模式-web地址
*/ */
config.remoteUrl = { config.remoteUrl = {
enable: false, enable: false,
url: "http://electron-egg.kaka996.com/", url: 'http://electron-egg.kaka996.com/'
}; };
/** /**
...@@ -96,44 +76,44 @@ module.exports = (appInfo) => { ...@@ -96,44 +76,44 @@ module.exports = (appInfo) => {
transports: ["polling", "websocket"], transports: ["polling", "websocket"],
cors: { cors: {
origin: true, origin: true,
}, }
}; };
/** /**
* 内置http服务 * 内置http服务
*/ */
config.httpServer = { config.httpServer = {
enable: true, enable: false,
https: { https: {
enable: false, enable: false,
key: "/public/ssl/localhost+1.key", key: '/public/ssl/localhost+1.key',
cert: "/public/ssl/localhost+1.pem", cert: '/public/ssl/localhost+1.pem'
}, },
port: 7071, port: 7071,
cors: { cors: {
origin: false, origin: "*"
allowMethods: "GET,HEAD,PUT,POST,DELETE,PATCH,OPTIONS",
credentials: true,
}, },
body: { body: {
multipart: true, multipart: true,
formidable: { formidable: {
keepExtensions: true, keepExtensions: true
}, }
}, },
filterRequest: { filterRequest: {
uris: ["favicon.ico"], uris: [
returnData: "", 'favicon.ico'
}, ],
returnData: ''
}
}; };
/** /**
* 主进程 * 主进程
*/ */
config.mainServer = { config.mainServer = {
protocol: "http://", protocol: 'file://',
indexPath: "/public/dist/index.html", indexPath: '/public/dist/index.html',
host: "localhost", host: 'localhost',
port: 7072, port: 7072,
}; };
...@@ -141,7 +121,7 @@ module.exports = (appInfo) => { ...@@ -141,7 +121,7 @@ module.exports = (appInfo) => {
* 硬件加速 * 硬件加速
*/ */
config.hardGpu = { config.hardGpu = {
enable: false, enable: false
}; };
/** /**
...@@ -162,16 +142,16 @@ module.exports = (appInfo) => { ...@@ -162,16 +142,16 @@ module.exports = (appInfo) => {
}, },
tray: { tray: {
enable: true, enable: true,
title: "EE程序", title: 'EE程序',
icon: "/public/images/tray_logo.png", icon: '/public/images/tray.png'
}, },
security: { security: {
enable: true, enable: true,
}, },
awaken: { awaken: {
enable: true, enable: true,
protocol: "ee", protocol: 'ee',
args: [], args: []
}, },
autoUpdater: { autoUpdater: {
enable: true, enable: true,
...@@ -179,21 +159,21 @@ module.exports = (appInfo) => { ...@@ -179,21 +159,21 @@ module.exports = (appInfo) => {
macOS: false, macOS: false,
linux: false, linux: false,
options: { options: {
provider: "generic", provider: 'generic',
url: "http://kodo.qiniu.com/", url: 'http://kodo.qiniu.com/'
}, },
force: false, force: false,
}, },
javaServer: { javaServer: {
enable: false, enable: false,
port: 18080, port: 18080,
jreVersion: "jre1.8.0_201", jreVersion: 'jre1.8.0_201',
opt: '-server -Xms512M -Xmx512M -Xss512k -Dspring.profiles.active=prod -Dserver.port=${port} -Dlogging.file.path="${path}" ', opt: '-server -Xms512M -Xmx512M -Xss512k -Dspring.profiles.active=prod -Dserver.port=${port} -Dlogging.file.path="${path}" ',
name: "java-app.jar", name: 'java-app.jar'
}, }
}; };
return { return {
...config, ...config
}; };
}; }
'use strict'; 'use strict';
/* /**
* test * 开发环境配置,覆盖 config.default.js
*/ */
exports.testConfig = { module.exports = (appInfo) => {
login: 'http://local.com/api/login', const config = {};
/**
* 开发者工具
*/
config.openDevTools = {
mode: 'undocked'
};
/**
* 应用程序顶部菜单
*/
config.openAppMenu = true;
return {
...config
};
}; };
'use strict'; 'use strict';
/* /**
* test * 生产环境配置,覆盖 config.default.js
*/ */
exports.testConfig = { module.exports = (appInfo) => {
login: 'http://prod.com/api/login', const config = {};
/**
* 开发者工具
*/
config.openDevTools = false;
/**
* 应用程序顶部菜单
*/
config.openAppMenu = false;
return {
...config
};
}; };
/**
* 加密配置
* @param type - confusion | bytecode | strict
*/
module.exports = {
type: "bytecode",
directory: ["electron"],
files: [
"electron/**/*.(js|json)",
"!electron/config/encrypt.js",
"!electron/config/nodemon.json",
"!electron/config/builder.json",
],
fileExt: [".js"],
confusionOptions: {},
};
"use strict"; 'use strict';
const { Controller } = require("ee-core"); const { Controller } = require('ee-core');
const Log = require("ee-core/log"); const Log = require('ee-core/log');
const Services = require("ee-core/services"); const Services = require('ee-core/services');
const db = require("../model");
/** /**
* example * example
* @class * @class
*/ */
class ExampleController extends Controller { class ExampleController extends Controller {
constructor(ctx) { constructor(ctx) {
super(ctx); super(ctx);
} }
/** /**
* 所有方法接收两个参数 * 所有方法接收两个参数
* @param args 前端传的参数 * @param args 前端传的参数
...@@ -23,23 +24,13 @@ class ExampleController extends Controller { ...@@ -23,23 +24,13 @@ class ExampleController extends Controller {
/** /**
* test * test
*/ */
async test() { async test () {
const User = require("../model/user")(db.sequelize, db.Sequelize.DataTypes); const result = await Services.get('example').test('electron');
Log.info('service result:', result);
// const result = await Services.get("example").test("electron");
// Log.info("service result:", result, db );
let res = await User.create({
username: "丁大炮",
email: "1148547900@qq.com",
});
return { return 'hello electron-egg';
code: 0,
data: res,
};
} }
} }
ExampleController.toString = () => "[class ExampleController]"; ExampleController.toString = () => '[class ExampleController]';
module.exports = ExampleController; module.exports = ExampleController;
\ No newline at end of file
{
"development": {
"dialect": "sqlite",
"storage": "/Users/wuhao/Desktop/demos/standaloneframe/data/database.sqlite"
},
"test": {
"dialect": "sqlite",
"storage": "/Users/wuhao/Desktop/demos/standaloneframe/data/database.sqlite"
},
"production": {
"dialect": "sqlite",
"storage": "/Users/wuhao/Desktop/demos/standaloneframe/data/database.sqlite"
}
}
\ No newline at end of file
"use strict";
/** @type {import('sequelize-cli').Migration} */
module.exports = {
async up(queryInterface, Sequelize) {
await queryInterface.createTable("Users", {
id: {
allowNull: false,
autoIncrement: true,
primaryKey: true,
type: Sequelize.INTEGER,
},
username: {
type: Sequelize.STRING,
},
email: {
type: Sequelize.STRING,
},
createdAt: {
allowNull: false,
type: Sequelize.DATE,
},
updatedAt: {
allowNull: false,
type: Sequelize.DATE,
},
});
},
async down(queryInterface, Sequelize) {
await queryInterface.dropTable("Users");
},
};
...@@ -32,6 +32,7 @@ class Index extends Application { ...@@ -32,6 +32,7 @@ class Index extends Application {
const win = this.electron.mainWindow; const win = this.electron.mainWindow;
win.once('ready-to-show', () => { win.once('ready-to-show', () => {
win.show(); win.show();
win.focus();
}) })
} }
} }
......
const Job = require('ee-core/jobs/baseJobClass'); const Job = require('ee-core/jobs/baseJobClass');
const Loader = require('ee-core/loader');
const Log = require('ee-core/log'); const Log = require('ee-core/log');
const Ps = require('ee-core/ps'); const Ps = require('ee-core/ps');
const { childMessage } = require('ee-core/message');
const Hello = Loader.requireJobsModule('./example/hello');
/** /**
* example - TimerJob * example - TimerJob
...@@ -22,31 +19,9 @@ class TimerJob extends Job { ...@@ -22,31 +19,9 @@ class TimerJob extends Job {
async handle () { async handle () {
Log.info("[child-process] TimerJob params: ", this.params); Log.info("[child-process] TimerJob params: ", this.params);
// 计时器任务
let eventName = 'job-timer-progress';
let number = 0;
let jobId = this.params.jobId;
let timer = setInterval(function() {
Hello.welcome();
childMessage.send(eventName, {jobId, number});
number++;
}, 1000);
// 用 setTimeout 模拟任务运行时长
setTimeout(() => {
// 关闭定时器
clearInterval(timer);
// 任务结束,重置前端显示
childMessage.send(eventName, {jobId, number:0, pid:0});
// 如果是childJob任务,必须调用 Ps.exit() 方法,让进程退出,否则会常驻内存
// 如果是childPoolJob任务,常驻内存,等待下一个业务
if (Ps.isChildJob()) { if (Ps.isChildJob()) {
Ps.exit(); Ps.exit();
} }
}, 10 * 1000)
} }
} }
......
"use strict";
const Sequelize = require("sequelize");
const process = require("process");
const env = process.env.NODE_ENV || "development";
const config = require("../database/config.json")[env];
const db = {};
let sequelize = new Sequelize(
config.database,
config.username,
config.password,
config
);
Object.keys(db).forEach((modelName) => {
if (db[modelName].associate) {
db[modelName].associate(db);
}
});
db.sequelize = sequelize;
db.Sequelize = Sequelize;
module.exports = db;
"use strict";
const { Model } = require("sequelize");
module.exports = (sequelize, DataTypes) => {
class User extends Model {
/**
* Helper method for defining associations.
* This method is not a part of Sequelize lifecycle.
* The `models/index` file will call this method automatically.
*/
static associate(models) {
// define association here
}
}
User.init(
{
username: DataTypes.STRING,
email: DataTypes.STRING,
},
{
sequelize,
modelName: "User",
}
);
return User;
};
/************************************************* /*************************************************
** preload为预加载模块,该文件将会在程序启动时加载 ** ** preload为预加载模块,该文件将会在程序启动时加载 **
*************************************************/ *************************************************/
const Addon = require('ee-core/addon'); const Addon = require('ee-core/addon');
/** /**
* 预加载模块入口 * 预加载模块入口
*/ */
module.exports = async () => { module.exports = async () => {
// 示例功能模块,可选择性使用和修改 // 示例功能模块,可选择性使用和修改
Addon.get('tray').create(); Addon.get('tray').create();
Addon.get('security').create(); Addon.get('security').create();
Addon.get('awaken').create(); Addon.get('awaken').create();
Addon.get('autoUpdater').create(); Addon.get('autoUpdater').create();
} }
\ No newline at end of file \ No newline at end of file
PORT=8080
\ No newline at end of file
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
"dayjs": "^1.11.7", "dayjs": "^1.11.7",
"react-resizable": "^3.0.5", "react-resizable": "^3.0.5",
"react-reveal": "^1.2.2", "react-reveal": "^1.2.2",
"techui-react-lite": "^0.0.6",
"umi": "^4.0.69", "umi": "^4.0.69",
"umi-request": "^1.4.0" "umi-request": "^1.4.0"
}, },
......
...@@ -28,6 +28,7 @@ a { ...@@ -28,6 +28,7 @@ a {
z-index: 1111; z-index: 1111;
transition: all 0.4s; transition: all 0.4s;
cursor: pointer; cursor: pointer;
pointer-events: none;
} }
.ant-pro-form-login-header { .ant-pro-form-login-header {
height: auto !important; height: auto !important;
...@@ -87,7 +88,7 @@ a { ...@@ -87,7 +88,7 @@ a {
.ant-tabs-nav::before { .ant-tabs-nav::before {
border: none !important; border: none !important;
} }
.ant-card-head{ .ant-card-head {
border: none !important; border: none !important;
} }
} }
...@@ -137,9 +138,59 @@ a { ...@@ -137,9 +138,59 @@ a {
.contained { .contained {
.ant-drawer-body { .ant-drawer-body {
padding: 0 !important; padding: 0 !important;
padding-right: 24px !important;
} }
} }
.contain { .contain {
margin: 0 12px; margin: 0 12px;
} }
.ant-table-content {
margin-right: -6px;
padding-right: 6px;
}
/* 显示内容的滚动条 */
.ant-table-content::-webkit-scrollbar {
width: 0.5em; /* 调整滚动条宽度 */
height: 4px;
}
/* 滚动条的轨道 */
.ant-table-content::-webkit-scrollbar-track {
background: transparent; /* 设置轨道的背景颜色 */
}
/* 滚动条的滑块 */
.ant-table-content::-webkit-scrollbar-thumb {
background: rgba(163, 163, 163, 0.454); /* 设置滑块的背景颜色 */
border-radius: 4px; /* 设置滑块的圆角 */
}
/* 鼠标悬停在滑块上时 */
.ant-table-content::-webkit-scrollbar-thumb:hover {
background: #555; /* 设置悬停状态下滑块的背景颜色 */
}
.element{
margin-right: -6px;
padding-right: 6px;
}
/* 显示内容的滚动条 */
.element::-webkit-scrollbar {
width: 0.5em; /* 调整滚动条宽度 */
}
/* 滚动条的轨道 */
.element::-webkit-scrollbar-track {
background: transparent; /* 设置轨道的背景颜色 */
}
/* 滚动条的滑块 */
.element::-webkit-scrollbar-thumb {
background: rgba(163, 163, 163, 0.454); /* 设置滑块的背景颜色 */
border-radius: 4px; /* 设置滑块的圆角 */
}
/* 鼠标悬停在滑块上时 */
.element::-webkit-scrollbar-thumb:hover {
background: #555; /* 设置悬停状态下滑块的背景颜色 */
}
...@@ -62,7 +62,7 @@ function Headers({ currentUser, children, broken }) { ...@@ -62,7 +62,7 @@ function Headers({ currentUser, children, broken }) {
shape="circle" shape="circle"
></Button> ></Button>
</div> </div>
<div style={{ marginRight: 112, gap: 12 }} className="centerl"> <div style={{ marginRight: 24, gap: 12 }} className="centerl">
<Dropdown <Dropdown
menu={{ menu={{
items, items,
......
export default {
token: {
colorPrimary: "#59c4f2", //主题颜色
colorBorder: "transparent",
colorBgContainer: "#102536",
colorBgElevated: "rgba(0,0,0,0.8)",
colorBgDeep: "#081520"
},
};
/*
* @Author: wuhao930406 1148547900@qq.com
* @Date: 2023-10-17 10:14:53
* @LastEditors: wuhao930406 1148547900@qq.com
* @LastEditTime: 2023-10-17 15:58:12
* @FilePath: /standaloneframe/frontend/src/layouts/index.jsx
* @Description:
*
* Copyright (c) 2023 by ${git_name_email}, All Rights Reserved.
*/
import { Link, Outlet, history } from "umi"; import { Link, Outlet, history } from "umi";
import { Button, ConfigProvider, theme, Segmented, Space, Divider } from "antd"; import { Button, ConfigProvider, theme, Segmented, Space, Divider } from "antd";
import styles from "./index.less"; import styles from "./index.less";
...@@ -8,28 +18,25 @@ import Switches from "@/components/Switches"; ...@@ -8,28 +18,25 @@ import Switches from "@/components/Switches";
import zhCN from "antd/locale/zh_CN"; import zhCN from "antd/locale/zh_CN";
import "dayjs/locale/zh-cn"; import "dayjs/locale/zh-cn";
import dayjs from "dayjs"; import dayjs from "dayjs";
import themeconfig from "./components/theme";
dayjs.locale("zh-cn"); dayjs.locale("zh-cn");
export default function Layout() { export default function Layout() {
const [mode, setmode] = useState("light"); const [mode, setmode] = useState("light");
return ( return (
<ConfigProvider <ConfigProvider
theme={{ theme={{
algorithm: mode === "light" ? theme.algorithm : theme.darkAlgorithm, algorithm: theme.darkAlgorithm,
token: { ...themeconfig,
colorPrimary: "#59c4f2",
colorBorder:mode === "light" ? "#f0f0f0": "transparent"
},
}} }}
locale={zhCN} locale={zhCN}
> >
<div <div
style={{ backgroundColor: mode === "light" ? "#fff" : "#363636" }} style={{ backgroundColor:"#363636" }}
> >
<div className="drag"></div> <div className="drag"></div>
<Space {/* <Space
align="center" align="center"
direction="horizontal" direction="horizontal"
split={<Divider type="vertical" />} split={<Divider type="vertical" />}
...@@ -47,7 +54,7 @@ export default function Layout() { ...@@ -47,7 +54,7 @@ export default function Layout() {
setmode(val); setmode(val);
}} }}
></Switches> ></Switches>
</Space> </Space> */}
<Outlet context={{ mode }} /> <Outlet context={{ mode }} />
</div> </div>
</ConfigProvider> </ConfigProvider>
......
...@@ -19,4 +19,5 @@ ...@@ -19,4 +19,5 @@
line-height: 64px; line-height: 64px;
cursor: pointer; cursor: pointer;
transition: color 0.3s; transition: color 0.3s;
color:#081520
} }
...@@ -30,11 +30,12 @@ const items = [UserOutlined, VideoCameraOutlined].map((icon, index) => ({ ...@@ -30,11 +30,12 @@ const items = [UserOutlined, VideoCameraOutlined].map((icon, index) => ({
})); }));
const Dashboard = () => { const Dashboard = () => {
const [collapsed, setCollapsed] = useState(false); const collapsed = true;
const [collapseds, setCollapsed] = useState(false);
const [broken, setbroken] = useState(false); const [broken, setbroken] = useState(false);
const [open, setopen] = useState(false); const [open, setopen] = useState(false);
const { const {
token: { colorBgContainer, colorTextBase }, token: { colorBgContainer, colorTextBase, colorBgDeep },
} = theme.useToken(); } = theme.useToken();
const { const {
...@@ -48,12 +49,9 @@ const Dashboard = () => { ...@@ -48,12 +49,9 @@ const Dashboard = () => {
const MenuDOM = ( const MenuDOM = (
<div <div
style={{ style={{
backgroundColor: mode === "light" ? "#f5f5f5" : "rgba(255,255,255,0.1)", backgroundColor: colorBgDeep,
margin: 24,
marginRight: 0,
padding: 12, padding: 12,
borderRadius: 12, height: "calc(100%)",
height: "calc(100% - 48px)",
color: colorTextBase, color: colorTextBase,
display: "flex", display: "flex",
flexDirection: "column", flexDirection: "column",
...@@ -97,7 +95,7 @@ const Dashboard = () => { ...@@ -97,7 +95,7 @@ const Dashboard = () => {
<div style={{ flex: 1 }}> <div style={{ flex: 1 }}>
<Menu <Menu
theme={mode} theme={"dark"}
mode="inline" mode="inline"
selectedKeys={[pathname]} selectedKeys={[pathname]}
items={items} items={items}
...@@ -121,10 +119,6 @@ const Dashboard = () => { ...@@ -121,10 +119,6 @@ const Dashboard = () => {
<Tooltip title="退出登录" placement="right"> <Tooltip title="退出登录" placement="right">
<div <div
className="sorts" className="sorts"
style={{
"--color":
mode === "light" ? "rgba(0,0,0,0.1)" : "rgba(255,255,255,0.1)",
}}
onClick={() => { onClick={() => {
doFetch({ url: "/webtool/logout", params: {} }).then((res) => { doFetch({ url: "/webtool/logout", params: {} }).then((res) => {
localStorage.removeItem("TOKENES"); localStorage.removeItem("TOKENES");
...@@ -136,17 +130,12 @@ const Dashboard = () => { ...@@ -136,17 +130,12 @@ const Dashboard = () => {
</div> </div>
</Tooltip> </Tooltip>
<div style={{ marginTop: collapsed ? 14 : 0 }}> <div style={{ marginTop: collapsed ? 14 : 0 }}>
<div <div className="sorts">
className="sorts"
style={{
"--color":
mode === "light" ? "rgba(0,0,0,0.1)" : "rgba(255,255,255,0.1)",
}}
>
{React.createElement( {React.createElement(
collapsed ? MenuUnfoldOutlined : MenuFoldOutlined, collapsed ? MenuUnfoldOutlined : MenuFoldOutlined,
{ {
className: "trigger", className: "trigger",
style: { color: colorTextBase },
onClick: () => setCollapsed(!collapsed), onClick: () => setCollapsed(!collapsed),
} }
)} )}
...@@ -157,13 +146,7 @@ const Dashboard = () => { ...@@ -157,13 +146,7 @@ const Dashboard = () => {
); );
return ( return (
<Layout <Layout hasSider className="contained">
hasSider
className="contained"
style={{
"--bgcolor": mode === "light" ? "#fff" : "rgba(255,255,255,0.1)",
}}
>
<Drawer <Drawer
title={null} title={null}
open={open} open={open}
...@@ -174,7 +157,7 @@ const Dashboard = () => { ...@@ -174,7 +157,7 @@ const Dashboard = () => {
zIndex={99999} zIndex={99999}
closable={false} closable={false}
maskClosable={true} maskClosable={true}
width={260} width={200}
getContainer={false} getContainer={false}
> >
{MenuDOM} {MenuDOM}
...@@ -188,14 +171,12 @@ const Dashboard = () => { ...@@ -188,14 +171,12 @@ const Dashboard = () => {
style={{ style={{
overflow: "auto", overflow: "auto",
height: "100vh", height: "100vh",
background: colorBgContainer, "--width": broken ? 0 : 78,
"--width": broken ? 0 : 100,
}} }}
trigger={null} trigger={null}
collapsible collapsible
collapsed={collapsed} collapsed={collapsed}
collapsedWidth={broken ? 0 : 100} collapsedWidth={broken ? 0 : 78}
theme={mode}
> >
{!broken && MenuDOM} {!broken && MenuDOM}
</Sider> </Sider>
...@@ -212,17 +193,12 @@ const Dashboard = () => { ...@@ -212,17 +193,12 @@ const Dashboard = () => {
history.push("/"); history.push("/");
}} }}
/> />
<div <div className="sorts">
className="sorts"
style={{
"--color":
mode === "light" ? "rgba(0,0,0,0.1)" : "rgba(255,255,255,0.1)",
}}
>
{React.createElement( {React.createElement(
collapsed ? MenuUnfoldOutlined : MenuFoldOutlined, collapsed ? MenuUnfoldOutlined : MenuFoldOutlined,
{ {
className: "trigger", className: "trigger",
style: { color: colorTextBase },
onClick: () => setopen(!open), onClick: () => setopen(!open),
} }
)} )}
......
...@@ -21,6 +21,9 @@ const Login = () => { ...@@ -21,6 +21,9 @@ const Login = () => {
console.log(ipc); console.log(ipc);
const handleSubmit = async (values) => { const handleSubmit = async (values) => {
history.push("/");
return
if (loginType === "account") { if (loginType === "account") {
// 登录 // 登录
const msg = await doFetch({ const msg = await doFetch({
...@@ -60,12 +63,6 @@ const Login = () => { ...@@ -60,12 +63,6 @@ const Login = () => {
const [loginType, setLoginType] = useState("account"); const [loginType, setLoginType] = useState("account");
const { data } = useRequest(async () => {
let res = await getFetch({ url: "/controller/example/test", params: {} });
return res?.data;
});
console.log(data);
return ( return (
<div <div
...@@ -94,7 +91,7 @@ const Login = () => { ...@@ -94,7 +91,7 @@ const Login = () => {
logo={ logo={
<img alt="logo" src="./logo.png" style={{ borderRadius: "50%" }} /> <img alt="logo" src="./logo.png" style={{ borderRadius: "50%" }} />
} }
subTitle={data?.username + "———军工健康监测系统"} subTitle={"———军工健康监测系统"}
initialValues={{ initialValues={{
autoLogin: true, autoLogin: true,
}} }}
......
...@@ -3083,6 +3083,25 @@ axios@^0.27.2: ...@@ -3083,6 +3083,25 @@ axios@^0.27.2:
follow-redirects "^1.14.9" follow-redirects "^1.14.9"
form-data "^4.0.0" form-data "^4.0.0"
ayin-color@*:
version "1.0.9"
resolved "https://registry.npmmirror.com/ayin-color/-/ayin-color-1.0.9.tgz#5d4698bd7aa5ceedb0a3ba7b1606009c2edaef9e"
integrity sha512-15iZN205m0TzrqxzkfiYxVUQ18yVIG/s8CTh/9q7KLVkWhv0nfpSGBnFeOZtFIy0HZ2Qv5IyVmlI65e1SmrOOA==
dependencies:
ayin-lessmixins "*"
chroma-js "*"
less "*"
less-loader "*"
ayin-lessmixins@*:
version "1.1.0"
resolved "https://registry.npmmirror.com/ayin-lessmixins/-/ayin-lessmixins-1.1.0.tgz#ef389de9a8fefe7afffda12c11513b9c4c6535c6"
integrity sha512-l0alHVeJfVFF/huui59hxm/TKiLTluhtZJIriCUM93vXUjNME34fi11aoUAIwN/F0UhQxstaZ71f2uy7z0kq9g==
dependencies:
ayin-color "*"
less "*"
less-loader "*"
babel-jest@^29.4.3: babel-jest@^29.4.3:
version "29.5.0" version "29.5.0"
resolved "https://registry.npmmirror.com/babel-jest/-/babel-jest-29.5.0.tgz#3fe3ddb109198e78b1c88f9ebdecd5e4fc2f50a5" resolved "https://registry.npmmirror.com/babel-jest/-/babel-jest-29.5.0.tgz#3fe3ddb109198e78b1c88f9ebdecd5e4fc2f50a5"
...@@ -3446,6 +3465,11 @@ chokidar@3.5.3, chokidar@^3.4.0, chokidar@^3.5.3: ...@@ -3446,6 +3465,11 @@ chokidar@3.5.3, chokidar@^3.4.0, chokidar@^3.5.3:
optionalDependencies: optionalDependencies:
fsevents "~2.3.2" fsevents "~2.3.2"
chroma-js@*:
version "2.4.2"
resolved "https://registry.npmmirror.com/chroma-js/-/chroma-js-2.4.2.tgz#dffc214ed0c11fa8eefca2c36651d8e57cbfb2b0"
integrity sha512-U9eDw6+wt7V8z5NncY2jJfZa+hUH8XEj8FQHgFJTrUFnJfXYf4Ml4adI2vXZOjqRDpFWtYVWypDfZwnJ+HIR4A==
ci-info@^3.2.0: ci-info@^3.2.0:
version "3.8.0" version "3.8.0"
resolved "https://registry.npmmirror.com/ci-info/-/ci-info-3.8.0.tgz#81408265a5380c929f0bc665d62256628ce9ef91" resolved "https://registry.npmmirror.com/ci-info/-/ci-info-3.8.0.tgz#81408265a5380c929f0bc665d62256628ce9ef91"
...@@ -4041,6 +4065,14 @@ dva-loading@^3.0.22: ...@@ -4041,6 +4065,14 @@ dva-loading@^3.0.22:
dependencies: dependencies:
"@babel/runtime" "^7.0.0" "@babel/runtime" "^7.0.0"
echarts@*:
version "5.4.3"
resolved "https://registry.npmmirror.com/echarts/-/echarts-5.4.3.tgz#f5522ef24419164903eedcfd2b506c6fc91fb20c"
integrity sha512-mYKxLxhzy6zyTi/FaEbJMOZU1ULGEQHaeIeuMR5L+JnJTpz+YR03mnnpBhbR4+UYJAgiXgpyTVLffPAjOTLkZA==
dependencies:
tslib "2.3.0"
zrender "5.4.4"
electron-to-chromium@^1.4.411: electron-to-chromium@^1.4.411:
version "1.4.416" version "1.4.416"
resolved "https://registry.npmmirror.com/electron-to-chromium/-/electron-to-chromium-1.4.416.tgz#7291f704168d3842ae4da3ae9fdc7bfbeb97d116" resolved "https://registry.npmmirror.com/electron-to-chromium/-/electron-to-chromium-1.4.416.tgz#7291f704168d3842ae4da3ae9fdc7bfbeb97d116"
...@@ -5490,6 +5522,28 @@ kolorist@^1.6.0: ...@@ -5490,6 +5522,28 @@ kolorist@^1.6.0:
resolved "https://registry.npmmirror.com/kolorist/-/kolorist-1.8.0.tgz#edddbbbc7894bc13302cdf740af6374d4a04743c" resolved "https://registry.npmmirror.com/kolorist/-/kolorist-1.8.0.tgz#edddbbbc7894bc13302cdf740af6374d4a04743c"
integrity sha512-Y+60/zizpJ3HRH8DCss+q95yr6145JXZo46OTpFvDZWLfRCE4qChOyk1b26nMaNpfHHgxagk9dXT5OP0Tfe+dQ== integrity sha512-Y+60/zizpJ3HRH8DCss+q95yr6145JXZo46OTpFvDZWLfRCE4qChOyk1b26nMaNpfHHgxagk9dXT5OP0Tfe+dQ==
less-loader@*:
version "11.1.3"
resolved "https://registry.npmmirror.com/less-loader/-/less-loader-11.1.3.tgz#1bb62d6ca9bf00a177c02793b54baac40f9be694"
integrity sha512-A5b7O8dH9xpxvkosNrP0dFp2i/dISOJa9WwGF3WJflfqIERE2ybxh1BFDj5CovC2+jCE4M354mk90hN6ziXlVw==
less@*:
version "4.2.0"
resolved "https://registry.npmmirror.com/less/-/less-4.2.0.tgz#cbefbfaa14a4cd388e2099b2b51f956e1465c450"
integrity sha512-P3b3HJDBtSzsXUl0im2L7gTO5Ubg8mEN6G8qoTS77iXxXX4Hvu4Qj540PZDvQ8V6DmX6iXo98k7Md0Cm1PrLaA==
dependencies:
copy-anything "^2.0.1"
parse-node-version "^1.0.1"
tslib "^2.3.0"
optionalDependencies:
errno "^0.1.1"
graceful-fs "^4.1.2"
image-size "~0.5.0"
make-dir "^2.1.0"
mime "^1.4.1"
needle "^3.1.0"
source-map "~0.6.0"
less@4.1.3: less@4.1.3:
version "4.1.3" version "4.1.3"
resolved "https://registry.npmmirror.com/less/-/less-4.1.3.tgz#175be9ddcbf9b250173e0a00b4d6920a5b770246" resolved "https://registry.npmmirror.com/less/-/less-4.1.3.tgz#175be9ddcbf9b250173e0a00b4d6920a5b770246"
...@@ -7924,6 +7978,14 @@ tapable@^2.0.0, tapable@^2.2.0, tapable@^2.2.1: ...@@ -7924,6 +7978,14 @@ tapable@^2.0.0, tapable@^2.2.0, tapable@^2.2.1:
resolved "https://registry.npmmirror.com/tapable/-/tapable-2.2.1.tgz#1967a73ef4060a82f12ab96af86d52fdb76eeca0" resolved "https://registry.npmmirror.com/tapable/-/tapable-2.2.1.tgz#1967a73ef4060a82f12ab96af86d52fdb76eeca0"
integrity sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ== integrity sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==
techui-react-lite@^0.0.6:
version "0.0.6"
resolved "https://registry.npmmirror.com/techui-react-lite/-/techui-react-lite-0.0.6.tgz#3600d8dca301f3f7ba78a0570dc19428ef902796"
integrity sha512-CrbHbzrW18xUw5Q8ou9dIa50tMQVezQzQF54Ed1cVxnURO73+waRpPX0aCvF7V/uPT5WJyffwj7ZbnxM0AVlOA==
dependencies:
ayin-color "*"
echarts "*"
terser@^5.10.0: terser@^5.10.0:
version "5.17.6" version "5.17.6"
resolved "https://registry.npmmirror.com/terser/-/terser-5.17.6.tgz#d810e75e1bb3350c799cd90ebefe19c9412c12de" resolved "https://registry.npmmirror.com/terser/-/terser-5.17.6.tgz#d810e75e1bb3350c799cd90ebefe19c9412c12de"
...@@ -8004,6 +8066,11 @@ tslib@2.0.1: ...@@ -8004,6 +8066,11 @@ tslib@2.0.1:
resolved "https://registry.npmmirror.com/tslib/-/tslib-2.0.1.tgz#410eb0d113e5b6356490eec749603725b021b43e" resolved "https://registry.npmmirror.com/tslib/-/tslib-2.0.1.tgz#410eb0d113e5b6356490eec749603725b021b43e"
integrity sha512-SgIkNheinmEBgx1IUNirK0TUD4X9yjjBRTqqjggWCU3pUEqIk3/Uwl3yRixYKT6WjQuGiwDv4NomL3wqRCj+CQ== integrity sha512-SgIkNheinmEBgx1IUNirK0TUD4X9yjjBRTqqjggWCU3pUEqIk3/Uwl3yRixYKT6WjQuGiwDv4NomL3wqRCj+CQ==
tslib@2.3.0:
version "2.3.0"
resolved "https://registry.npmmirror.com/tslib/-/tslib-2.3.0.tgz#803b8cdab3e12ba581a4ca41c8839bbb0dacb09e"
integrity sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg==
tslib@^1.8.1: tslib@^1.8.1:
version "1.14.1" version "1.14.1"
resolved "https://registry.npmmirror.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" resolved "https://registry.npmmirror.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00"
...@@ -8396,3 +8463,10 @@ yocto-queue@^0.1.0: ...@@ -8396,3 +8463,10 @@ yocto-queue@^0.1.0:
version "0.1.0" version "0.1.0"
resolved "https://registry.npmmirror.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" resolved "https://registry.npmmirror.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b"
integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==
zrender@5.4.4:
version "5.4.4"
resolved "https://registry.npmmirror.com/zrender/-/zrender-5.4.4.tgz#8854f1d95ecc82cf8912f5a11f86657cb8c9e261"
integrity sha512-0VxCNJ7AGOMCWeHVyTrGzUgrK4asT4ml9PEkeGirAkKNYXYzoPJCLvmyfdoOXcjTHPs10OZVMfD1Rwg16AZyYw==
dependencies:
tslib "2.3.0"
2023-06-15 13:35:12,015 INFO 9746 [addon:tray] load
2023-06-15 13:35:12,026 INFO 9746 [addon:security] load
2023-06-15 13:35:12,026 INFO 9746 [addon:awaken] load
2023-06-15 13:35:12,028 INFO 9746 [addon:autoUpdater] load
2023-06-15 13:35:39,860 INFO 9788 [addon:tray] load
2023-06-15 13:35:39,867 INFO 9788 [addon:security] load
2023-06-15 13:35:39,868 INFO 9788 [addon:awaken] load
2023-06-15 13:35:39,870 INFO 9788 [addon:autoUpdater] load
2023-06-15 15:51:15,745 INFO 11081 [addon:tray] load
2023-06-15 15:51:15,758 INFO 11081 [addon:security] load
2023-06-15 15:51:15,758 INFO 11081 [addon:awaken] load
2023-06-15 15:51:15,761 INFO 11081 [addon:autoUpdater] load
2023-06-15 16:11:40,938 INFO 11439 [addon:tray] load
2023-06-15 16:11:40,950 INFO 11439 [addon:security] load
2023-06-15 16:11:40,950 INFO 11439 [addon:awaken] load
2023-06-15 16:11:40,952 INFO 11439 [addon:autoUpdater] load
2023-06-15 17:40:03,715 INFO 12266 [addon:tray] load
2023-06-15 17:40:03,726 INFO 12266 [addon:security] load
2023-06-15 17:40:03,726 INFO 12266 [addon:awaken] load
2023-06-15 17:40:03,728 INFO 12266 [addon:autoUpdater] load
2023-06-15 17:40:44,366 INFO 12336 [addon:tray] load
2023-06-15 17:40:44,376 INFO 12336 [addon:security] load
2023-06-15 17:40:44,377 INFO 12336 [addon:awaken] load
2023-06-15 17:40:44,379 INFO 12336 [addon:autoUpdater] load
2023-06-15 13:35:12,032 INFO 9746 [ee-core] Env: local, Type: spa
2023-06-15 13:35:12,032 INFO 9746 [ee-core] App running at: http://localhost:8080
2023-06-15 13:35:12,119 ERROR 9746 [ee-core] Please check the http://localhost:8080 are running OR modify config file !
2023-06-15 13:35:39,873 INFO 9788 [ee-core] Env: local, Type: spa
2023-06-15 13:35:39,874 INFO 9788 [ee-core] App running at: http://localhost:8080
2023-06-15 13:35:39,950 ERROR 9788 [ee-core] Please check the http://localhost:8080 are running OR modify config file !
2023-06-15 15:51:15,765 INFO 11081 [ee-core] Env: local, Type: spa
2023-06-15 15:51:15,765 INFO 11081 [ee-core] App running at: http://localhost:8000
2023-06-15 15:51:15,878 ERROR 11081 [ee-core] Please check the http://localhost:8000 are running OR modify config file !
2023-06-15 16:11:40,956 INFO 11439 [ee-core] Env: local, Type: spa
2023-06-15 16:11:40,956 INFO 11439 [ee-core] App running at: http://localhost:8000
2023-06-15 17:40:03,732 INFO 12266 [ee-core] Env: local, Type: spa
2023-06-15 17:40:03,732 INFO 12266 [ee-core] App running at: http://localhost:8000
2023-06-15 17:40:03,848 ERROR 12266 [ee-core] Please check the http://localhost:8000 are running OR modify config file !
2023-06-15 17:40:44,383 INFO 12336 [ee-core] Env: local, Type: spa
2023-06-15 17:40:44,383 INFO 12336 [ee-core] App running at: http://localhost:8000
2023-06-15 13:35:12,119 ERROR 9746 [ee-core] Please check the http://localhost:8080 are running OR modify config file !
2023-06-15 13:35:39,950 ERROR 9788 [ee-core] Please check the http://localhost:8080 are running OR modify config file !
2023-06-15 15:51:15,878 ERROR 11081 [ee-core] Please check the http://localhost:8000 are running OR modify config file !
2023-06-15 17:40:03,848 ERROR 12266 [ee-core] Please check the http://localhost:8000 are running OR modify config file !
{ {
"name": "standaloneframe", "name": "ee",
"version": "3.4.0", "version": "3.7.0",
"description": "A fast, desktop software development framework", "description": "A fast, desktop software development framework",
"main": "main.js", "main": "main.js",
"scripts": { "scripts": {
"start": "electron . ", "dev": "ee-bin dev",
"dev": "electron . --env=local", "dev-frontend": "ee-bin dev --serve=frontend",
"dev-electron": "ee-bin dev --serve=electron",
"build-frontend": "ee-bin build",
"start": "ee-bin start",
"rd": "ee-bin rd",
"encrypt": "ee-bin encrypt",
"clean": "ee-bin clean",
"icon": "ee-bin icon",
"reload": "nodemon --config ./electron/config/nodemon.json", "reload": "nodemon --config ./electron/config/nodemon.json",
"test": "set DEBUG=* && electron . --env=local", "rebuild": "electron-rebuild",
"re-sqlite": "electron-rebuild -f -w better-sqlite3",
"build-w": "electron-builder --config=./electron/config/builder.json -w=nsis --x64", "build-w": "electron-builder --config=./electron/config/builder.json -w=nsis --x64",
"build-w-32": "electron-builder --config=./electron/config/builder.json -w=nsis --ia32", "build-w-32": "electron-builder --config=./electron/config/builder.json -w=nsis --ia32",
"build-w-64": "electron-builder --config=./electron/config/builder.json -w=nsis --x64", "build-w-64": "electron-builder --config=./electron/config/builder.json -w=nsis --x64",
...@@ -25,22 +33,20 @@ ...@@ -25,22 +33,20 @@
"build-l-armv7l": "electron-builder --config=./electron/config/builder.json -l=deb --armv7l", "build-l-armv7l": "electron-builder --config=./electron/config/builder.json -l=deb --armv7l",
"build-lr-64": "electron-builder --config=./electron/config/builder.json -l=rpm --x64", "build-lr-64": "electron-builder --config=./electron/config/builder.json -l=rpm --x64",
"build-lp-64": "electron-builder --config=./electron/config/builder.json -l=pacman --x64", "build-lp-64": "electron-builder --config=./electron/config/builder.json -l=pacman --x64",
"rd": "ee-core rd --dist_dir=./frontend/dist", "test": "set DEBUG=* && electron . --env=local"
"encrypt": "ee-core encrypt",
"clean": "ee-core clean",
"rebuild": "electron-rebuild",
"re-sqlite": "electron-rebuild -f -w better-sqlite3"
}, },
"repository": "https://github.com/dromara/electron-egg.git", "repository": "https://github.com/dromara/electron-egg.git",
"keywords": [ "keywords": [
"Electron", "Electron",
"electron-egg" "electron-egg",
"ElectronEgg"
], ],
"author": "哆啦好梦, Inc <530353222@qq.com>", "author": "哆啦好梦, Inc <530353222@qq.com>",
"license": "Apache", "license": "Apache",
"devDependencies": { "devDependencies": {
"@electron/rebuild": "^3.2.13", "@electron/rebuild": "^3.2.13",
"debug": "^4.3.3", "debug": "^4.3.3",
"ee-bin": "^1.2.0",
"electron": "^21.4.4", "electron": "^21.4.4",
"electron-builder": "^23.6.0", "electron-builder": "^23.6.0",
"eslint": "^5.13.0", "eslint": "^5.13.0",
...@@ -48,13 +54,9 @@ ...@@ -48,13 +54,9 @@
"nodemon": "^2.0.16" "nodemon": "^2.0.16"
}, },
"dependencies": { "dependencies": {
"sequelize-cli": "^6.6.1",
"better-sqlite3": "^8.4.0",
"dayjs": "^1.10.7", "dayjs": "^1.10.7",
"ee-core": "^2.2.3", "ee-core": "^2.5.0",
"electron-updater": "^5.3.0", "electron-updater": "^5.3.0",
"lodash": "^4.17.21", "lodash": "^4.17.21"
"sequelize": "^6.32.0",
"sqlite3": "^5.1.6"
} }
} }
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment