ai-hero-cli 0.0.17 → 0.0.18

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.
Files changed (2) hide show
  1. package/bin.cjs +15 -3
  2. package/package.json +1 -1
package/bin.cjs CHANGED
@@ -68303,9 +68303,21 @@ var runLesson = Effect_exports.fn("runLesson")(function* (opts) {
68303
68303
  Command_exports.workingDirectory(cwd)
68304
68304
  );
68305
68305
  const processOutcome = yield* Effect_exports.raceAll([
68306
- Command_exports.exitCode(command2).pipe(
68307
- Effect_exports.map((code2) => code2 === 0 ? "exit" : "failed")
68308
- ),
68306
+ Effect_exports.gen(function* () {
68307
+ const proc = yield* Command_exports.start(command2);
68308
+ yield* Effect_exports.addFinalizer(
68309
+ () => proc.kill().pipe(
68310
+ Effect_exports.catchAll(
68311
+ (e) => Effect_exports.logError(
68312
+ `Error occurred when killing child process.`,
68313
+ e
68314
+ )
68315
+ )
68316
+ )
68317
+ );
68318
+ const result = yield* proc.exitCode;
68319
+ return result === 0 ? "exit" : "failed";
68320
+ }),
68309
68321
  Effect_exports.gen(function* () {
68310
68322
  const rl = readline2__namespace.createInterface({
68311
68323
  input: process.stdin
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai-hero-cli",
3
- "version": "0.0.17",
3
+ "version": "0.0.18",
4
4
  "type": "module",
5
5
  "description": "The CLI used to run exercises for the AI Hero course",
6
6
  "bin": "bin.cjs",