@serviceme/devtools-cli 0.2.1 → 0.3.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/bridgeServer.js +9 -1
- package/dist/cli.js +35 -3
- package/package.json +3 -3
package/dist/bridgeServer.js
CHANGED
|
@@ -68,6 +68,7 @@ var BRIDGE_METHODS = [
|
|
|
68
68
|
"repo.remove",
|
|
69
69
|
"repo.enable",
|
|
70
70
|
"repo.disable",
|
|
71
|
+
"repo.update",
|
|
71
72
|
"repo.sync",
|
|
72
73
|
"repo.syncAll",
|
|
73
74
|
"auth.status",
|
|
@@ -212,7 +213,7 @@ function normalizeServicemeError(error, fallbackCode = "internal_error") {
|
|
|
212
213
|
}
|
|
213
214
|
|
|
214
215
|
// src/version.ts
|
|
215
|
-
var SERVICEME_CLI_VERSION = "0.
|
|
216
|
+
var SERVICEME_CLI_VERSION = "0.3.0";
|
|
216
217
|
|
|
217
218
|
// src/bridge/handlers/AuthBridgeHandlers.ts
|
|
218
219
|
var import_auth2 = require("@serviceme/devtools-core/auth");
|
|
@@ -597,6 +598,13 @@ var BridgeServer = class {
|
|
|
597
598
|
this.writeSuccess(request.id, result);
|
|
598
599
|
return;
|
|
599
600
|
}
|
|
601
|
+
case "repo.update": {
|
|
602
|
+
const r = request;
|
|
603
|
+
if (!this.skillRepoHandler) return this.unsupportedV2(request.id);
|
|
604
|
+
const result = await this.skillRepoHandler.repoUpdate(r.params);
|
|
605
|
+
this.writeSuccess(request.id, result);
|
|
606
|
+
return;
|
|
607
|
+
}
|
|
600
608
|
case "repo.sync": {
|
|
601
609
|
const r = request;
|
|
602
610
|
if (!this.skillRepoHandler) return this.unsupportedV2(request.id);
|
package/dist/cli.js
CHANGED
|
@@ -112,6 +112,7 @@ var BRIDGE_METHODS = [
|
|
|
112
112
|
"repo.remove",
|
|
113
113
|
"repo.enable",
|
|
114
114
|
"repo.disable",
|
|
115
|
+
"repo.update",
|
|
115
116
|
"repo.sync",
|
|
116
117
|
"repo.syncAll",
|
|
117
118
|
"auth.status",
|
|
@@ -776,7 +777,7 @@ var readline = __toESM(require("readline"));
|
|
|
776
777
|
|
|
777
778
|
// src/version.ts
|
|
778
779
|
var SERVICEME_CLI_NAME = "serviceme";
|
|
779
|
-
var SERVICEME_CLI_VERSION = "0.
|
|
780
|
+
var SERVICEME_CLI_VERSION = "0.3.0";
|
|
780
781
|
|
|
781
782
|
// src/bridge/handlers/AuthBridgeHandlers.ts
|
|
782
783
|
var import_auth3 = require("@serviceme/devtools-core/auth");
|
|
@@ -1161,6 +1162,13 @@ var BridgeServer = class {
|
|
|
1161
1162
|
this.writeSuccess(request.id, result);
|
|
1162
1163
|
return;
|
|
1163
1164
|
}
|
|
1165
|
+
case "repo.update": {
|
|
1166
|
+
const r = request;
|
|
1167
|
+
if (!this.skillRepoHandler) return this.unsupportedV2(request.id);
|
|
1168
|
+
const result = await this.skillRepoHandler.repoUpdate(r.params);
|
|
1169
|
+
this.writeSuccess(request.id, result);
|
|
1170
|
+
return;
|
|
1171
|
+
}
|
|
1164
1172
|
case "repo.sync": {
|
|
1165
1173
|
const r = request;
|
|
1166
1174
|
if (!this.skillRepoHandler) return this.unsupportedV2(request.id);
|
|
@@ -1575,7 +1583,8 @@ var SkillRepoBridgeHandler = class {
|
|
|
1575
1583
|
const result = await repoManager.addUserRepo({
|
|
1576
1584
|
url: params.url,
|
|
1577
1585
|
branch: params.branch,
|
|
1578
|
-
name: params.name
|
|
1586
|
+
name: params.name,
|
|
1587
|
+
useProxy: params.useProxy
|
|
1579
1588
|
});
|
|
1580
1589
|
return {
|
|
1581
1590
|
repo: toBridgeRepoEntry(result.repo),
|
|
@@ -1588,7 +1597,8 @@ var SkillRepoBridgeHandler = class {
|
|
|
1588
1597
|
* repos (the Store enforces this).
|
|
1589
1598
|
*/
|
|
1590
1599
|
async repoRemove(params) {
|
|
1591
|
-
|
|
1600
|
+
const repoManager = this.buildRepoManager();
|
|
1601
|
+
await repoManager.removeUserRepo(params.repoId);
|
|
1592
1602
|
return { removed: true };
|
|
1593
1603
|
}
|
|
1594
1604
|
/** Enable a repo (sets `enabled = true`). */
|
|
@@ -1601,6 +1611,27 @@ var SkillRepoBridgeHandler = class {
|
|
|
1601
1611
|
const repo = await this.reposStore.disableRepo(params.repoId);
|
|
1602
1612
|
return { repo: toBridgeRepoEntry(repo) };
|
|
1603
1613
|
}
|
|
1614
|
+
/** Update editable repo fields (url/branch/name/enabled). */
|
|
1615
|
+
async repoUpdate(params) {
|
|
1616
|
+
const patch = {};
|
|
1617
|
+
if (typeof params.url === "string") {
|
|
1618
|
+
patch.url = params.url;
|
|
1619
|
+
}
|
|
1620
|
+
if (typeof params.branch === "string") {
|
|
1621
|
+
patch.branch = params.branch;
|
|
1622
|
+
}
|
|
1623
|
+
if (typeof params.name === "string") {
|
|
1624
|
+
patch.name = params.name;
|
|
1625
|
+
}
|
|
1626
|
+
if (typeof params.enabled === "boolean") {
|
|
1627
|
+
patch.enabled = params.enabled;
|
|
1628
|
+
}
|
|
1629
|
+
if (typeof params.useProxy === "boolean") {
|
|
1630
|
+
patch.useProxy = params.useProxy;
|
|
1631
|
+
}
|
|
1632
|
+
const repo = await this.reposStore.updateRepo(params.repoId, patch);
|
|
1633
|
+
return { repo: toBridgeRepoEntry(repo) };
|
|
1634
|
+
}
|
|
1604
1635
|
/** Sync (pull) a single repo. Returns the per-repo outcome. */
|
|
1605
1636
|
async repoSync(params) {
|
|
1606
1637
|
const repoManager = this.buildRepoManager();
|
|
@@ -1696,6 +1727,7 @@ function toBridgeRepoEntry(repo) {
|
|
|
1696
1727
|
url: repo.url,
|
|
1697
1728
|
branch: repo.branch,
|
|
1698
1729
|
enabled: repo.enabled,
|
|
1730
|
+
useProxy: repo.useProxy,
|
|
1699
1731
|
writeEnabled: repo.writeEnabled,
|
|
1700
1732
|
source: repo.source,
|
|
1701
1733
|
description: repo.description,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@serviceme/devtools-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Unified SERVICEME CLI for automation, project scaffolding, and bridge-based tooling.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"repository": {
|
|
@@ -43,8 +43,8 @@
|
|
|
43
43
|
"tsup": "^8.5.1",
|
|
44
44
|
"tsx": "^4.22.0",
|
|
45
45
|
"typescript": "^5.9.3",
|
|
46
|
-
"@serviceme/devtools-core": "0.
|
|
47
|
-
"@serviceme/devtools-protocol": "0.
|
|
46
|
+
"@serviceme/devtools-core": "0.3.0",
|
|
47
|
+
"@serviceme/devtools-protocol": "0.3.0"
|
|
48
48
|
},
|
|
49
49
|
"scripts": {
|
|
50
50
|
"build": "tsup --config tsup.config.ts",
|