ai-hero-cli 0.0.14 → 0.0.16

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 +19 -10
  2. package/package.json +1 -1
package/bin.cjs CHANGED
@@ -68295,8 +68295,8 @@ var runLesson = Effect_exports.fn("runLesson")(function* (opts) {
68295
68295
  "pnpm",
68296
68296
  "tsx",
68297
68297
  "--env-file",
68298
- envFilePath,
68299
- mainFile
68298
+ `"${envFilePath}"`,
68299
+ `"${mainFile}"`
68300
68300
  ).pipe(
68301
68301
  Command_exports.stdout("inherit"),
68302
68302
  Command_exports.stderr("inherit"),
@@ -68363,10 +68363,11 @@ var runLesson = Effect_exports.fn("runLesson")(function* (opts) {
68363
68363
  cwd
68364
68364
  });
68365
68365
  }
68366
- if (foundLesson.isExplainer() && readmeFile) {
68366
+ const isExplainer = yield* foundLesson.isExplainer();
68367
+ if (isExplainer && readmeFile) {
68367
68368
  yield* logReadmeFile({ readmeFile });
68368
68369
  }
68369
- const lessonNoun = foundLesson.isExplainer() ? {
68370
+ const lessonNoun = isExplainer ? {
68370
68371
  successMessage: `Explainer executed! Once you've read the readme and understand the code, you can go to the next exercise.`,
68371
68372
  failureMessage: `Looks like the explainer errored! Want to try again?`,
68372
68373
  lowercase: "explainer"
@@ -68621,11 +68622,14 @@ var runLessonSimple = (opts) => Effect_exports.gen(function* () {
68621
68622
  yield* Console_exports.log(
68622
68623
  util.styleText("bold", `Running ${lesson} ${subfolder}...`)
68623
68624
  );
68624
- ChildProcess.execSync(`pnpm tsx --env-file ${envFilePath} ${mainFile}`, {
68625
- stdio: "inherit",
68626
- cwd
68627
- });
68628
- if (foundLesson.isExplainer() && readmeFile) {
68625
+ ChildProcess.execSync(
68626
+ `pnpm tsx --env-file "${envFilePath}" "${mainFile}"`,
68627
+ {
68628
+ stdio: "inherit",
68629
+ cwd
68630
+ }
68631
+ );
68632
+ if ((yield* foundLesson.isExplainer()) && readmeFile) {
68629
68633
  yield* logReadmeFile({ readmeFile });
68630
68634
  }
68631
68635
  });
@@ -68776,7 +68780,12 @@ var updateCVM = Command_exports2.make(
68776
68780
  yield* Effect_exports.log(
68777
68781
  "[update-cvm] Successfully updated the CVM"
68778
68782
  );
68779
- })
68783
+ }).pipe(
68784
+ Effect_exports.catchAll((e) => {
68785
+ process.exitCode = 1;
68786
+ return Effect_exports.logError(e);
68787
+ })
68788
+ )
68780
68789
  );
68781
68790
  var createErrorTracker = () => {
68782
68791
  const groupedErrors = {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai-hero-cli",
3
- "version": "0.0.14",
3
+ "version": "0.0.16",
4
4
  "type": "module",
5
5
  "description": "The CLI used to run exercises for the AI Hero course",
6
6
  "bin": "bin.cjs",