[release] ee-bin@4.1.6 & ee-core@4.1.1

This commit is contained in:
gaoshuaixing
2025-03-24 10:35:26 +08:00
parent c4fe0df96c
commit 6902a76bd6
6 changed files with 11 additions and 8 deletions

View File

@@ -192,7 +192,7 @@ function getPlatform(delimiter = "_", isDiffArch = false) {
}
// Get cmd parameter by name
function getArgumentByName(args, name) {
function getArgumentByName(name, args) {
if (!args) {
args = process.argv;
}

View File

@@ -1,6 +1,6 @@
{
"name": "ee-bin",
"version": "4.1.6-beta.1",
"version": "4.1.6",
"description": "ee bin",
"main": "index.js",
"scripts": {

View File

@@ -91,7 +91,7 @@ class ServeProcess {
const electronConfig = binCmdConfig.electron;
// Debugging source code
const debugging = getArgumentByName(electronConfig.args, 'debuger') == 'true'? true : false;
const debugging = getArgumentByName('debuger', electronConfig.args) == 'true'? true : false;
this._switchPkgMain(debugging);
// watche electron main code

View File

@@ -1,6 +1,6 @@
{
"name": "ee-core",
"version": "4.1.0",
"version": "4.1.1",
"description": "ee core",
"main": "index.js",
"scripts": {

View File

@@ -36,4 +36,4 @@ export declare function makeMessage(msg?: {}): {
export declare function exitChildJob(code?: number): void;
export declare function isChildJob(): boolean;
export declare function isChildPoolJob(): boolean;
export declare function getArgumentByName(name: string): string;
export declare function getArgumentByName(name: string, args?: any): string;

View File

@@ -244,9 +244,12 @@ function isChildPoolJob() {
}
// Get cmd parameter by name
function getArgumentByName(name) {
for (let i = 0; i < process.argv.length; i++) {
const item = process.argv[i]
function getArgumentByName(name, args) {
if (!args) {
args = process.argv;
}
for (let i = 0; i < args.length; i++) {
const item = args[i];
const prefixKey = `--${name}=`;
if (item.indexOf(prefixKey) !== -1) {
return item.substring(prefixKey.length);