groupchat 0.0.8 → 0.0.9
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.
- package/dist/index.js +10 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3419,7 +3419,7 @@ function getUpdateCommand() {
|
|
|
3419
3419
|
// src/components/UpdatePrompt.tsx
|
|
3420
3420
|
import { useState } from "react";
|
|
3421
3421
|
import { Box, Text, useInput, useApp } from "ink";
|
|
3422
|
-
import { execSync } from "child_process";
|
|
3422
|
+
import { execSync, spawn } from "child_process";
|
|
3423
3423
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3424
3424
|
var options = [
|
|
3425
3425
|
{ label: "Update now", value: "update" },
|
|
@@ -3454,8 +3454,14 @@ function UpdatePrompt({ updateInfo, onComplete }) {
|
|
|
3454
3454
|
const command = getUpdateCommand();
|
|
3455
3455
|
try {
|
|
3456
3456
|
execSync(command, { stdio: "inherit" });
|
|
3457
|
-
console.log("\n\nUpdate complete!
|
|
3458
|
-
|
|
3457
|
+
console.log("\n\nUpdate complete! Restarting...\n");
|
|
3458
|
+
const args = process.argv.slice(2);
|
|
3459
|
+
const child = spawn("groupchat", args, {
|
|
3460
|
+
detached: true,
|
|
3461
|
+
stdio: "inherit"
|
|
3462
|
+
});
|
|
3463
|
+
child.unref();
|
|
3464
|
+
setTimeout(() => exit(), 100);
|
|
3459
3465
|
} catch (err) {
|
|
3460
3466
|
setUpdateError(
|
|
3461
3467
|
`Update failed. Please run manually: ${command}`
|
|
@@ -3511,7 +3517,7 @@ function UpdatePrompt({ updateInfo, onComplete }) {
|
|
|
3511
3517
|
// package.json
|
|
3512
3518
|
var package_default = {
|
|
3513
3519
|
name: "groupchat",
|
|
3514
|
-
version: "0.0.
|
|
3520
|
+
version: "0.0.9",
|
|
3515
3521
|
description: "CLI chat client for Groupchat",
|
|
3516
3522
|
type: "module",
|
|
3517
3523
|
main: "./dist/index.js",
|