File tree 5 files changed +13
-4
lines changed
5 files changed +13
-4
lines changed Original file line number Diff line number Diff line change 1
1
const ipc = require ( 'node-ipc' )
2
2
3
+ const defaultId = process . env . VUE_CLI_IPC || 'vue-cli'
4
+
3
5
exports . IpcMessenger = class IpcMessenger {
4
- constructor ( id = 'vue-cli' ) {
6
+ constructor ( id = defaultId ) {
5
7
ipc . config . id = this . id = id
6
8
ipc . config . retry = 1500
7
9
ipc . config . silent = true
Original file line number Diff line number Diff line change 5
5
"serve" : " vue-cli-service serve" ,
6
6
"build" : " vue-cli-service build" ,
7
7
"lint" : " vue-cli-service lint" ,
8
- "graphql-api" : " cross-env VUE_CLI_DEBUG=true VUE_CLI_UI_DEV=true vue-cli-service graphql-api" ,
8
+ "graphql-api" : " cross-env VUE_CLI_DEBUG=true VUE_CLI_UI_DEV=true VUE_CLI_IPC=vue-cli-dev vue-cli-service graphql-api" ,
9
9
"run-graphql-api" : " vue-cli-service run-graphql-api" ,
10
- "test-graphql-api" : " cross-env VUE_CLI_UI_TEST=true VUE_APP_GRAPHQL_PORT=4040 VUE_APP_CLI_UI_URL=ws://localhost:4040/graphql yarn run graphql-api" ,
10
+ "test-graphql-api" : " cross-env VUE_CLI_UI_TEST=true VUE_APP_GRAPHQL_PORT=4040 VUE_APP_CLI_UI_URL=ws://localhost:4040/graphql VUE_CLI_IPC=vue-cli-test yarn run graphql-api" ,
11
11
"prepublishOnly" : " yarn run lint --no-fix && yarn run build" ,
12
12
"test:e2e:dev" : " cross-env VUE_APP_CLI_UI_URL=ws://localhost:4040/graphql vue-cli-service test:e2e --mode development" ,
13
13
"test:e2e:run" : " vue-cli-service test:e2e --mode production --headless --url=http://localhost:4040" ,
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ const ipc = require('node-ipc')
2
2
// Utils
3
3
const { log, dumpObject } = require ( '../utils/logger' )
4
4
5
- ipc . config . id = 'vue-cli'
5
+ ipc . config . id = process . env . VUE_CLI_IPC || 'vue-cli'
6
6
ipc . config . retry = 1500
7
7
ipc . config . silent = true
8
8
Original file line number Diff line number Diff line change 1
1
const { log, error, openBrowser } = require ( '@vue/cli-shared-utils' )
2
2
const { portfinder, server } = require ( '@vue/cli-ui/server' )
3
+ const shortid = require ( 'shortid' )
3
4
4
5
async function ui ( options = { } , context = process . cwd ( ) ) {
5
6
let port = options . port
@@ -18,6 +19,11 @@ async function ui (options = {}, context = process.cwd()) {
18
19
process . env . VUE_CLI_UI_DEV = true
19
20
}
20
21
22
+ if ( ! process . env . VUE_CLI_IPC ) {
23
+ // Prevent IPC id conflicts
24
+ process . env . VUE_CLI_IPC = `vue-cli-${ shortid ( ) } `
25
+ }
26
+
21
27
if ( ! options . quiet ) log ( `🚀 Starting GUI...` )
22
28
23
29
const opts = {
Original file line number Diff line number Diff line change 53
53
"request-promise-native" : " ^1.0.5" ,
54
54
"resolve" : " ^1.5.0" ,
55
55
"semver" : " ^5.4.1" ,
56
+ "shortid" : " ^2.2.8" ,
56
57
"slash" : " ^1.0.0" ,
57
58
"validate-npm-package-name" : " ^3.0.0" ,
58
59
"yaml-front-matter" : " ^3.4.1"
You can’t perform that action at this time.
0 commit comments