slackhive 0.2.0 → 0.2.1

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/dist/index.js +17 -4
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -15515,12 +15515,25 @@ function nativeUpdate(dir) {
15515
15515
  }
15516
15516
  stopSpinner.succeed("Stopped");
15517
15517
  }
15518
+ const isGitRepo = (0, import_fs.existsSync)((0, import_path.join)(dir, ".git"));
15519
+ if (!isGitRepo) {
15520
+ console.log(import_chalk.default.yellow(" This installation was not set up via git."));
15521
+ console.log(import_chalk.default.gray(" To update, run: ") + import_chalk.default.white("npm update -g slackhive"));
15522
+ return;
15523
+ }
15518
15524
  const pullSpinner = (0, import_ora.default)("Pulling latest changes...").start();
15519
15525
  try {
15520
- (0, import_child_process.execSync)("git pull", { cwd: dir, stdio: "ignore" });
15521
- pullSpinner.succeed("Code updated");
15522
- } catch {
15526
+ const output = (0, import_child_process.execSync)("git pull 2>&1", { cwd: dir, encoding: "utf-8" });
15527
+ if (output.includes("Already up to date")) {
15528
+ pullSpinner.succeed("Already up to date");
15529
+ } else {
15530
+ pullSpinner.succeed("Code updated");
15531
+ }
15532
+ } catch (err) {
15533
+ const msg = err.stdout ?? err.stderr ?? "";
15523
15534
  pullSpinner.fail("Failed to pull");
15535
+ if (msg) console.log(import_chalk.default.gray(" " + msg.trim().split("\n")[0]));
15536
+ console.log(import_chalk.default.gray(" Tip: if you have local changes, run ") + import_chalk.default.white("git stash") + import_chalk.default.gray(" first, then retry."));
15524
15537
  return;
15525
15538
  }
15526
15539
  const buildSpinner = (0, import_ora.default)("Rebuilding...").start();
@@ -15565,7 +15578,7 @@ var require_package = __commonJS({
15565
15578
  "package.json"(exports2, module2) {
15566
15579
  module2.exports = {
15567
15580
  name: "slackhive",
15568
- version: "0.2.0",
15581
+ version: "0.2.1",
15569
15582
  description: "CLI to install and manage SlackHive \u2014 AI agent teams on Slack",
15570
15583
  bin: {
15571
15584
  slackhive: "./dist/index.js"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "slackhive",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "CLI to install and manage SlackHive — AI agent teams on Slack",
5
5
  "bin": {
6
6
  "slackhive": "./dist/index.js"