Skip to content

Commit 029bd2e

Browse files
committed
feat: artisan commands in bundles
1 parent ecb8a03 commit 029bd2e

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

resources/js/electron-plugin/dist/server/api/childProcess.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ function startProcess(settings) {
5555
});
5656
});
5757
proc.stderr.on('data', (data) => {
58-
console.error('Error received from process [' + alias + ']:', data.toString());
58+
console.error('Process [' + alias + '] ERROR:', data.toString().trim());
5959
notifyLaravel('events', {
6060
event: 'Native\\Laravel\\Events\\ChildProcess\\ErrorReceived',
6161
payload: {
@@ -119,7 +119,8 @@ function startProcess(settings) {
119119
}
120120
function startPhpProcess(settings) {
121121
const defaultEnv = getDefaultEnvironmentVariables(state.randomSecret, state.electronApiPort);
122-
const iniSettings = Object.assign(Object.assign({}, getDefaultPhpIniSettings()), state.phpIni);
122+
const customIniSettings = settings.phpIni || {};
123+
const iniSettings = Object.assign(Object.assign(Object.assign({}, getDefaultPhpIniSettings()), state.phpIni), customIniSettings);
123124
const iniArgs = Object.keys(iniSettings).map(key => {
124125
return ['-d', `${key}=${iniSettings[key]}`];
125126
}).flat();

resources/js/electron-plugin/src/server/api/childProcess.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ function startProcess(settings) {
6666
});
6767

6868
proc.stderr.on('data', (data) => {
69-
console.error('Error received from process [' + alias + ']:', data.toString());
69+
console.error('Process [' + alias + '] ERROR:', data.toString().trim());
7070

7171
notifyLaravel('events', {
7272
event: 'Native\\Laravel\\Events\\ChildProcess\\ErrorReceived',
@@ -77,6 +77,8 @@ function startProcess(settings) {
7777
});
7878
});
7979

80+
// Experimental feature on Electron,
81+
// I keep this here to remember and retry when we upgrade
8082
// proc.on('error', (error) => {
8183
// clearTimeout(startTimeout);
8284
// console.error(`Process [${alias}] error: ${error.message}`);
@@ -160,7 +162,8 @@ function startPhpProcess(settings) {
160162
);
161163

162164
// Construct command args from ini settings
163-
const iniSettings = {...getDefaultPhpIniSettings(), ...state.phpIni};
165+
const customIniSettings = settings.phpIni || {};
166+
const iniSettings = {...getDefaultPhpIniSettings(), ...state.phpIni, ...customIniSettings};
164167
const iniArgs = Object.keys(iniSettings).map(key => {
165168
return ['-d', `${key}=${iniSettings[key]}`];
166169
}).flat();

0 commit comments

Comments
 (0)