flightdeck 0.0.5 → 0.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/flightdeck.bin.js
CHANGED
|
@@ -180,8 +180,8 @@ class FlightDeck {
|
|
|
180
180
|
this.startService(serviceName);
|
|
181
181
|
return;
|
|
182
182
|
}
|
|
183
|
-
const [
|
|
184
|
-
const serviceProcess = spawn(
|
|
183
|
+
const [exe, ...args] = this.options.services[serviceName].run.split(` `);
|
|
184
|
+
const serviceProcess = spawn(exe, args, {
|
|
185
185
|
cwd: this.options.flightdeckRootDir,
|
|
186
186
|
env: import.meta.env
|
|
187
187
|
});
|
|
@@ -275,7 +275,7 @@ class FlightDeck {
|
|
|
275
275
|
stopService(serviceName) {
|
|
276
276
|
if (this.services[serviceName]) {
|
|
277
277
|
this.serviceLoggers[serviceName].info(`Stopping service...`);
|
|
278
|
-
this.services[serviceName].process.kill();
|
|
278
|
+
this.services[serviceName].process.kill(`SIGINT`);
|
|
279
279
|
this.services[serviceName] = null;
|
|
280
280
|
this.servicesDead[this.serviceIdx[serviceName]].use(Promise.resolve());
|
|
281
281
|
this.servicesLive[this.serviceIdx[serviceName]] = new Future(() => {
|
|
@@ -301,7 +301,7 @@ var FLIGHTDECK_MANUAL = {
|
|
|
301
301
|
optionsSchema: z.object({
|
|
302
302
|
secret: z.string(),
|
|
303
303
|
packageName: z.string(),
|
|
304
|
-
services: z.record(z.object({ run: z.
|
|
304
|
+
services: z.record(z.object({ run: z.string(), waitFor: z.boolean() })),
|
|
305
305
|
flightdeckRootDir: z.string(),
|
|
306
306
|
scripts: z.object({
|
|
307
307
|
download: z.string(),
|
|
@@ -325,7 +325,7 @@ var FLIGHTDECK_MANUAL = {
|
|
|
325
325
|
flag: `s`,
|
|
326
326
|
required: true,
|
|
327
327
|
description: `Map of service names to executables.`,
|
|
328
|
-
example: `--services="{\\"frontend\\":{\\"run\\"
|
|
328
|
+
example: `--services="{\\"frontend\\":{\\"run\\":\\"./frontend\\",\\"waitFor\\":false},\\"backend\\":{\\"run\\":\\"./backend\\",\\"waitFor\\":true}}"`,
|
|
329
329
|
parse: JSON.parse
|
|
330
330
|
},
|
|
331
331
|
flightdeckRootDir: {
|
package/dist/lib.d.ts
CHANGED
package/dist/lib.js
CHANGED
|
@@ -184,8 +184,8 @@ class FlightDeck {
|
|
|
184
184
|
this.startService(serviceName);
|
|
185
185
|
return;
|
|
186
186
|
}
|
|
187
|
-
const [
|
|
188
|
-
const serviceProcess = spawn(
|
|
187
|
+
const [exe, ...args] = this.options.services[serviceName].run.split(` `);
|
|
188
|
+
const serviceProcess = spawn(exe, args, {
|
|
189
189
|
cwd: this.options.flightdeckRootDir,
|
|
190
190
|
env: import.meta.env
|
|
191
191
|
});
|
|
@@ -279,7 +279,7 @@ class FlightDeck {
|
|
|
279
279
|
stopService(serviceName) {
|
|
280
280
|
if (this.services[serviceName]) {
|
|
281
281
|
this.serviceLoggers[serviceName].info(`Stopping service...`);
|
|
282
|
-
this.services[serviceName].process.kill();
|
|
282
|
+
this.services[serviceName].process.kill(`SIGINT`);
|
|
283
283
|
this.services[serviceName] = null;
|
|
284
284
|
this.servicesDead[this.serviceIdx[serviceName]].use(Promise.resolve());
|
|
285
285
|
this.servicesLive[this.serviceIdx[serviceName]] = new Future(() => {
|
package/package.json
CHANGED
package/src/flightdeck.bin.ts
CHANGED
|
@@ -13,9 +13,7 @@ const FLIGHTDECK_MANUAL = {
|
|
|
13
13
|
optionsSchema: z.object({
|
|
14
14
|
secret: z.string(),
|
|
15
15
|
packageName: z.string(),
|
|
16
|
-
services: z.record(
|
|
17
|
-
z.object({ run: z.array(z.string()), waitFor: z.boolean() }),
|
|
18
|
-
),
|
|
16
|
+
services: z.record(z.object({ run: z.string(), waitFor: z.boolean() })),
|
|
19
17
|
flightdeckRootDir: z.string(),
|
|
20
18
|
scripts: z.object({
|
|
21
19
|
download: z.string(),
|
|
@@ -39,7 +37,7 @@ const FLIGHTDECK_MANUAL = {
|
|
|
39
37
|
flag: `s`,
|
|
40
38
|
required: true,
|
|
41
39
|
description: `Map of service names to executables.`,
|
|
42
|
-
example: `--services="{\\"frontend\\":{\\"run\\"
|
|
40
|
+
example: `--services="{\\"frontend\\":{\\"run\\":\\"./frontend\\",\\"waitFor\\":false},\\"backend\\":{\\"run\\":\\"./backend\\",\\"waitFor\\":true}}"`,
|
|
43
41
|
parse: JSON.parse,
|
|
44
42
|
},
|
|
45
43
|
flightdeckRootDir: {
|
package/src/flightdeck.lib.ts
CHANGED
|
@@ -18,7 +18,7 @@ import { ChildSocket } from "atom.io/realtime-server"
|
|
|
18
18
|
export type FlightDeckOptions<S extends string = string> = {
|
|
19
19
|
secret: string
|
|
20
20
|
packageName: string
|
|
21
|
-
services: { [service in S]: { run: string
|
|
21
|
+
services: { [service in S]: { run: string; waitFor: boolean } }
|
|
22
22
|
scripts: {
|
|
23
23
|
download: string
|
|
24
24
|
install: string
|
|
@@ -237,8 +237,8 @@ export class FlightDeck<S extends string = string> {
|
|
|
237
237
|
return
|
|
238
238
|
}
|
|
239
239
|
|
|
240
|
-
const [
|
|
241
|
-
const serviceProcess = spawn(
|
|
240
|
+
const [exe, ...args] = this.options.services[serviceName].run.split(` `)
|
|
241
|
+
const serviceProcess = spawn(exe, args, {
|
|
242
242
|
cwd: this.options.flightdeckRootDir,
|
|
243
243
|
env: import.meta.env,
|
|
244
244
|
})
|
|
@@ -347,7 +347,7 @@ export class FlightDeck<S extends string = string> {
|
|
|
347
347
|
public stopService(serviceName: S): void {
|
|
348
348
|
if (this.services[serviceName]) {
|
|
349
349
|
this.serviceLoggers[serviceName].info(`Stopping service...`)
|
|
350
|
-
this.services[serviceName].process.kill()
|
|
350
|
+
this.services[serviceName].process.kill(`SIGINT`)
|
|
351
351
|
this.services[serviceName] = null
|
|
352
352
|
this.servicesDead[this.serviceIdx[serviceName]].use(Promise.resolve())
|
|
353
353
|
this.servicesLive[this.serviceIdx[serviceName]] = new Future(() => {})
|