glop.dev 0.6.0 → 0.7.0
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 +20 -6
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
// src/index.ts
|
|
4
|
-
import { Command as
|
|
4
|
+
import { Command as Command8 } from "commander";
|
|
5
5
|
|
|
6
6
|
// src/commands/auth.ts
|
|
7
7
|
import { Command } from "commander";
|
|
@@ -596,8 +596,21 @@ var initCommand = new Command5("init").description("Install Claude Code hooks in
|
|
|
596
596
|
console.log(`${hadHooks ? "\u2713 glop updated" : "\u2713 glop connected"} \u2014 sessions will appear at ${config.server_url}/live`);
|
|
597
597
|
});
|
|
598
598
|
|
|
599
|
-
// src/commands/
|
|
599
|
+
// src/commands/update.ts
|
|
600
600
|
import { Command as Command6 } from "commander";
|
|
601
|
+
import { execSync as execSync4 } from "child_process";
|
|
602
|
+
var updateCommand = new Command6("update").description("Update glop to the latest version").action(() => {
|
|
603
|
+
console.log("Updating glop\u2026");
|
|
604
|
+
try {
|
|
605
|
+
execSync4("npm install -g glop.dev@latest", { stdio: "inherit" });
|
|
606
|
+
console.log("\nglop has been updated successfully.");
|
|
607
|
+
} catch {
|
|
608
|
+
process.exitCode = 1;
|
|
609
|
+
}
|
|
610
|
+
});
|
|
611
|
+
|
|
612
|
+
// src/commands/workspace.ts
|
|
613
|
+
import { Command as Command7 } from "commander";
|
|
601
614
|
|
|
602
615
|
// src/lib/select.ts
|
|
603
616
|
function interactiveSelect(items, initialIndex = 0) {
|
|
@@ -661,7 +674,7 @@ function interactiveSelect(items, initialIndex = 0) {
|
|
|
661
674
|
}
|
|
662
675
|
|
|
663
676
|
// src/commands/workspace.ts
|
|
664
|
-
var workspaceCommand = new
|
|
677
|
+
var workspaceCommand = new Command7("workspace").description("View or switch workspaces").action(async () => {
|
|
665
678
|
const config = loadConfig();
|
|
666
679
|
if (!config) {
|
|
667
680
|
console.error("Not authenticated. Run `glop auth` first.");
|
|
@@ -827,7 +840,7 @@ async function checkForUpdate(currentVersion) {
|
|
|
827
840
|
if (isNewerVersion(currentVersion, latestVersion)) {
|
|
828
841
|
console.error(
|
|
829
842
|
`
|
|
830
|
-
Update available: ${currentVersion} \u2192 ${latestVersion}. Run \`
|
|
843
|
+
Update available: ${currentVersion} \u2192 ${latestVersion}. Run \`glop update\` to update.
|
|
831
844
|
`
|
|
832
845
|
);
|
|
833
846
|
}
|
|
@@ -838,7 +851,7 @@ async function checkForUpdate(currentVersion) {
|
|
|
838
851
|
// package.json
|
|
839
852
|
var package_default = {
|
|
840
853
|
name: "glop.dev",
|
|
841
|
-
version: "0.
|
|
854
|
+
version: "0.7.0",
|
|
842
855
|
type: "module",
|
|
843
856
|
bin: {
|
|
844
857
|
glop: "./dist/index.js"
|
|
@@ -865,12 +878,13 @@ var package_default = {
|
|
|
865
878
|
};
|
|
866
879
|
|
|
867
880
|
// src/index.ts
|
|
868
|
-
var program = new
|
|
881
|
+
var program = new Command8().name("glop").description("Passive control plane for local Claude-driven development").version(package_default.version);
|
|
869
882
|
program.addCommand(authCommand);
|
|
870
883
|
program.addCommand(deactivateCommand);
|
|
871
884
|
program.addCommand(doctorCommand);
|
|
872
885
|
program.addCommand(hookCommand, { hidden: true });
|
|
873
886
|
program.addCommand(initCommand);
|
|
887
|
+
program.addCommand(updateCommand);
|
|
874
888
|
program.addCommand(workspaceCommand);
|
|
875
889
|
program.hook("postAction", async (_thisCommand, actionCommand) => {
|
|
876
890
|
if (actionCommand.name() === "__hook") return;
|