@rendotdev/rig 0.0.16 → 0.0.17

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/rig.js +6 -7
  2. package/package.json +1 -1
package/dist/rig.js CHANGED
@@ -197,24 +197,23 @@ class CliApplication {
197
197
  }
198
198
  configureUpdateCommand() {
199
199
  this.program.command("update").description("Update rig to the latest published version.").action(async () => {
200
+ const $ = globalThis.Bun.$;
200
201
  const currentVersion = this.version();
201
202
  console.log(`Current version: ${currentVersion}`);
202
203
  console.log("Checking for updates...");
203
- const result = spawnSync("npm", ["install", "-g", "@rendotdev/rig@latest", "--force"], {
204
- stdio: "pipe"
205
- });
206
- if (result.status !== 0) {
204
+ const result = await $`npm install -g @rendotdev/rig@latest --force`.quiet().nothrow();
205
+ if (result.exitCode !== 0) {
207
206
  console.error("Update failed.");
208
207
  process.exit(1);
209
208
  }
210
- const check = spawnSync("rig", ["--version"], { encoding: "utf8", stdio: "pipe" });
211
- const newVersion = check.stdout?.trim() ?? "unknown";
209
+ const check = await $`rig --version`.quiet().text();
210
+ const newVersion = check.trim();
212
211
  if (newVersion === currentVersion) {
213
212
  console.log(`Already on the latest version (${currentVersion}).`);
214
213
  } else {
215
214
  console.log(`Updated: ${currentVersion} -> ${newVersion}`);
216
215
  }
217
- spawnSync("rig", ["init"], { stdio: "inherit" });
216
+ await $`rig init`;
218
217
  });
219
218
  }
220
219
  configureDevCommands() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rendotdev/rig",
3
- "version": "0.0.16",
3
+ "version": "0.0.17",
4
4
  "description": "Local typed command runtime for agents.",
5
5
  "homepage": "https://github.com/rendotdev/rig#readme",
6
6
  "bugs": {