ai-hero-cli 0.2.5 → 0.2.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.
Files changed (2) hide show
  1. package/bin.cjs +25 -11
  2. package/package.json +1 -1
package/bin.cjs CHANGED
@@ -83935,7 +83935,17 @@ var chooseLessonAndRunIt = (opts) => Effect_exports.gen(function* () {
83935
83935
  cwd: opts.cwd,
83936
83936
  forceSubfolderIndex: void 0
83937
83937
  });
83938
- }).pipe(Effect_exports.catchAll(Console_exports.log));
83938
+ }).pipe(
83939
+ Effect_exports.catchTags({
83940
+ PromptCancelledError: () => {
83941
+ return Effect_exports.gen(function* () {
83942
+ yield* Console_exports.log("Operation cancelled");
83943
+ process.exitCode = 0;
83944
+ });
83945
+ }
83946
+ }),
83947
+ Effect_exports.catchAll(Console_exports.log)
83948
+ );
83939
83949
  var exercise = Command_exports2.make(
83940
83950
  "exercise",
83941
83951
  {
@@ -84504,10 +84514,6 @@ var CouldNotParseCloudinaryUrlError = class extends Data_exports.TaggedError(
84504
84514
  "CouldNotParseCloudinaryUrlError"
84505
84515
  ) {
84506
84516
  };
84507
- var NoImagesFoundError = class extends Data_exports.TaggedError(
84508
- "NoImagesFoundError"
84509
- ) {
84510
- };
84511
84517
  var EnvFileError = class extends Data_exports.TaggedError("EnvFileError") {
84512
84518
  };
84513
84519
  var EnvFileEmptyError = class extends Data_exports.TaggedError(
@@ -84580,9 +84586,7 @@ var uploadToCloudinary = Command_exports2.make(
84580
84586
  fileContent5.matchAll(imageRegex)
84581
84587
  );
84582
84588
  if (imageMatches.length === 0) {
84583
- return yield* new NoImagesFoundError({
84584
- message: "No images found in the markdown file"
84585
- });
84589
+ continue;
84586
84590
  }
84587
84591
  let updatedContent = fileContent5;
84588
84592
  const markdownDir = path5__namespace.dirname(readmeFile);
@@ -85149,7 +85153,7 @@ var editCommit = Command_exports2.make(
85149
85153
  "\u2713 Reset complete with unstaged changes"
85150
85154
  );
85151
85155
  yield* Console_exports.log(
85152
- "\nSession active. Make your changes to the code."
85156
+ "\nSession active. Make your changes to the code. ALL unstaged changes will be added to the commit."
85153
85157
  );
85154
85158
  const { ready } = yield* runPrompt(
85155
85159
  () => (0, import_prompts3.default)([
@@ -85170,7 +85174,7 @@ var editCommit = Command_exports2.make(
85170
85174
  yield* Console_exports.log(
85171
85175
  `Committing with original message: "${originalMessage}"`
85172
85176
  );
85173
- const addCommand = Command_exports.make("git", "add", "-A").pipe(
85177
+ const addCommand = Command_exports.make("git", "add", ".").pipe(
85174
85178
  Command_exports.workingDirectory(cwd),
85175
85179
  Command_exports.stdout("inherit"),
85176
85180
  Command_exports.stderr("inherit")
@@ -85337,6 +85341,16 @@ Cherry-picking ${followingCommitCount} commit${followingCommitCount === 1 ? "" :
85337
85341
  yield* Console_exports.log(
85338
85342
  `\u2713 Successfully pushed ${branch} to origin`
85339
85343
  );
85344
+ yield* Console_exports.log(
85345
+ `Switching back to ${currentBranch}...`
85346
+ );
85347
+ const switchBackCommand = Command_exports.make(
85348
+ "git",
85349
+ "checkout",
85350
+ currentBranch
85351
+ ).pipe(Command_exports.workingDirectory(cwd));
85352
+ yield* Command_exports.exitCode(switchBackCommand);
85353
+ yield* Console_exports.log(`\u2713 Switched back to ${currentBranch}`);
85340
85354
  }).pipe(
85341
85355
  Effect_exports.catchTags({
85342
85356
  NotAGitRepoError: (error4) => {
@@ -85487,7 +85501,7 @@ var upgradePackages = Command_exports2.make(
85487
85501
  "ai@latest",
85488
85502
  "@ai-sdk/*@latest",
85489
85503
  "ai-hero-cli@latest",
85490
- "evalite@latest",
85504
+ "evalite@beta",
85491
85505
  "vitest@latest"
85492
85506
  ).pipe(
85493
85507
  verbose ? Command_exports.stdout("inherit") : Command_exports.stdout("pipe"),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai-hero-cli",
3
- "version": "0.2.5",
3
+ "version": "0.2.7",
4
4
  "type": "module",
5
5
  "description": "The CLI used to run exercises for the AI Hero course",
6
6
  "bin": "bin.cjs",