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