ai-hero-cli 0.0.20 → 0.0.21
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/bin.cjs +11 -16
- package/package.json +1 -1
package/bin.cjs
CHANGED
|
@@ -68601,7 +68601,11 @@ var runLesson = Effect_exports.fn("runLesson")(function* (opts) {
|
|
|
68601
68601
|
const processOutcome = yield* Effect_exports.raceAll([
|
|
68602
68602
|
Effect_exports.gen(function* () {
|
|
68603
68603
|
const proc = yield* Command_exports.start(command2);
|
|
68604
|
-
const killWithLogging = () =>
|
|
68604
|
+
const killWithLogging = () => Effect_exports.gen(function* () {
|
|
68605
|
+
if (yield* proc.isRunning) {
|
|
68606
|
+
return yield* proc.kill();
|
|
68607
|
+
}
|
|
68608
|
+
}).pipe(
|
|
68605
68609
|
Effect_exports.catchAll(
|
|
68606
68610
|
(e) => Effect_exports.logDebug(
|
|
68607
68611
|
`Error occurred when killing child process.`,
|
|
@@ -68609,35 +68613,26 @@ var runLesson = Effect_exports.fn("runLesson")(function* (opts) {
|
|
|
68609
68613
|
)
|
|
68610
68614
|
)
|
|
68611
68615
|
);
|
|
68612
|
-
yield* Effect_exports.addFinalizer(
|
|
68613
|
-
|
|
68614
|
-
Effect_exports.catchAll(
|
|
68615
|
-
(e) => Effect_exports.logDebug(
|
|
68616
|
-
`Error occurred when killing child process.`,
|
|
68617
|
-
e
|
|
68618
|
-
)
|
|
68619
|
-
)
|
|
68620
|
-
)
|
|
68621
|
-
);
|
|
68622
|
-
const kill = () => killWithLogging().pipe(Effect_exports.runPromise);
|
|
68616
|
+
yield* Effect_exports.addFinalizer(() => killWithLogging());
|
|
68617
|
+
const killAsCallback = () => killWithLogging().pipe(Effect_exports.runPromise);
|
|
68623
68618
|
yield* Effect_exports.fork(
|
|
68624
68619
|
Effect_exports.sync(() => {
|
|
68625
|
-
process.on("SIGINT",
|
|
68620
|
+
process.on("SIGINT", killAsCallback);
|
|
68626
68621
|
})
|
|
68627
68622
|
);
|
|
68628
68623
|
yield* Effect_exports.fork(
|
|
68629
68624
|
Effect_exports.sync(() => {
|
|
68630
|
-
process.on("SIGTERM",
|
|
68625
|
+
process.on("SIGTERM", killAsCallback);
|
|
68631
68626
|
})
|
|
68632
68627
|
);
|
|
68633
68628
|
yield* Effect_exports.addFinalizer(() => {
|
|
68634
68629
|
return Effect_exports.sync(
|
|
68635
|
-
() => process.removeListener("SIGINT",
|
|
68630
|
+
() => process.removeListener("SIGINT", killAsCallback)
|
|
68636
68631
|
);
|
|
68637
68632
|
});
|
|
68638
68633
|
yield* Effect_exports.addFinalizer(() => {
|
|
68639
68634
|
return Effect_exports.sync(
|
|
68640
|
-
() => process.removeListener("SIGTERM",
|
|
68635
|
+
() => process.removeListener("SIGTERM", killAsCallback)
|
|
68641
68636
|
);
|
|
68642
68637
|
});
|
|
68643
68638
|
const result = yield* proc.exitCode;
|