forge-cw 0.1.14 → 0.1.15
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/console/index.html
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
8
8
|
<title>Forge Console</title>
|
|
9
9
|
<script type="importmap">{"imports":{"preact":"/shared/preact.js","preact/hooks":"/shared/preact-hooks.js","preact/jsx-runtime":"/shared/preact-jsx-runtime.js","preact/compat":"/shared/preact-compat.js","@preact/signals":"/shared/preact-signals.js","@forge-dev/ui":"/shared/forge-dev-ui.js","@forge-dev/sdk":"/shared/forge-dev-sdk.js"}}</script>
|
|
10
|
-
<script type="module" crossorigin src="/assets/index-
|
|
10
|
+
<script type="module" crossorigin src="/assets/index-m_7gobK_.js"></script>
|
|
11
11
|
<link rel="stylesheet" crossorigin href="/assets/index-DPf7M8cb.css">
|
|
12
12
|
<link rel="stylesheet" href="/shared/forge-dev-ui.css">
|
|
13
13
|
</head>
|
package/dist/index.js
CHANGED
|
@@ -2657,6 +2657,40 @@ function splitPluginId(id) {
|
|
|
2657
2657
|
const at = id.lastIndexOf("@");
|
|
2658
2658
|
return { name: id.slice(0, at), marketplace: id.slice(at + 1) };
|
|
2659
2659
|
}
|
|
2660
|
+
function catalogVersion(configDir, marketplaces, marketplace, name) {
|
|
2661
|
+
const known = marketplaces[marketplace];
|
|
2662
|
+
const location = isRecord(known) && typeof known["installLocation"] === "string" ? known["installLocation"] : join8(configDir, "plugins", "marketplaces", marketplace);
|
|
2663
|
+
const entries = readJson(join8(location, ".claude-plugin", "marketplace.json"))["plugins"];
|
|
2664
|
+
if (!Array.isArray(entries))
|
|
2665
|
+
return void 0;
|
|
2666
|
+
const entry = entries.find((e) => isRecord(e) && e["name"] === name);
|
|
2667
|
+
if (!entry)
|
|
2668
|
+
return void 0;
|
|
2669
|
+
if (typeof entry["version"] === "string")
|
|
2670
|
+
return entry["version"];
|
|
2671
|
+
const source = entry["source"];
|
|
2672
|
+
if (typeof source !== "string")
|
|
2673
|
+
return void 0;
|
|
2674
|
+
const dir = resolve2(location, source);
|
|
2675
|
+
if (!inside(location, dir))
|
|
2676
|
+
return void 0;
|
|
2677
|
+
const version = readJson(join8(dir, ".claude-plugin", "plugin.json"))["version"];
|
|
2678
|
+
return typeof version === "string" ? version : void 0;
|
|
2679
|
+
}
|
|
2680
|
+
function hasUpdate({ latest, version }) {
|
|
2681
|
+
if (!latest || latest === version)
|
|
2682
|
+
return false;
|
|
2683
|
+
const a = numeric(latest);
|
|
2684
|
+
const b = numeric(version);
|
|
2685
|
+
if (!a || !b)
|
|
2686
|
+
return true;
|
|
2687
|
+
for (let i = 0; i < Math.max(a.length, b.length); i++) {
|
|
2688
|
+
const d = (a[i] ?? 0) - (b[i] ?? 0);
|
|
2689
|
+
if (d !== 0)
|
|
2690
|
+
return d > 0;
|
|
2691
|
+
}
|
|
2692
|
+
return false;
|
|
2693
|
+
}
|
|
2660
2694
|
function projectSkillNames(projectPath) {
|
|
2661
2695
|
const dir = join8(projectPath, ".claude", "skills");
|
|
2662
2696
|
if (!existsSync6(dir))
|
|
@@ -2678,16 +2712,21 @@ async function listPlugins(reader, remoteOf) {
|
|
|
2678
2712
|
const user = entries.find((e) => isRecord(e) && e["scope"] === "user" && typeof e["installPath"] === "string");
|
|
2679
2713
|
if (!user)
|
|
2680
2714
|
continue;
|
|
2715
|
+
const { name, marketplace } = splitPluginId(id);
|
|
2716
|
+
const version = String(user["version"] ?? "");
|
|
2717
|
+
const latest = catalogVersion(configDir, marketplaces, marketplace, name);
|
|
2681
2718
|
const install = {
|
|
2682
2719
|
scope,
|
|
2683
2720
|
scopeRef,
|
|
2684
|
-
version
|
|
2721
|
+
version,
|
|
2685
2722
|
enabled: !isRecord(enabledPlugins) || enabledPlugins[id] !== false,
|
|
2686
2723
|
installPath: String(user["installPath"]),
|
|
2687
|
-
lastUpdated: typeof user["lastUpdated"] === "string" ? user["lastUpdated"] : void 0
|
|
2724
|
+
lastUpdated: typeof user["lastUpdated"] === "string" ? user["lastUpdated"] : void 0,
|
|
2725
|
+
latest,
|
|
2726
|
+
update: hasUpdate({ latest, version })
|
|
2688
2727
|
};
|
|
2689
2728
|
const list = found.get(id) ?? [];
|
|
2690
|
-
list.push({ install, repo: marketplaceSource(marketplaces[
|
|
2729
|
+
list.push({ install, repo: marketplaceSource(marketplaces[marketplace]) });
|
|
2691
2730
|
found.set(id, list);
|
|
2692
2731
|
}
|
|
2693
2732
|
}
|
|
@@ -2757,7 +2796,7 @@ function marketplaceSourceOf(reader, marketplace) {
|
|
|
2757
2796
|
}
|
|
2758
2797
|
return void 0;
|
|
2759
2798
|
}
|
|
2760
|
-
var isRecord, inside, pluginScopes, knownMarketplaces, knowsMarketplace;
|
|
2799
|
+
var isRecord, inside, pluginScopes, knownMarketplaces, numeric, knowsMarketplace;
|
|
2761
2800
|
var init_plugins = __esm({
|
|
2762
2801
|
"../core/dist/plugins.js"() {
|
|
2763
2802
|
"use strict";
|
|
@@ -2772,6 +2811,7 @@ var init_plugins = __esm({
|
|
|
2772
2811
|
...reader.getAccounts().map((a) => ({ scope: "account", scopeRef: a }))
|
|
2773
2812
|
];
|
|
2774
2813
|
knownMarketplaces = (configDir) => readJson(join8(configDir, "plugins", "known_marketplaces.json"));
|
|
2814
|
+
numeric = (v) => /^\d+(\.\d+)*$/.test(v) ? v.split(".").map(Number) : null;
|
|
2775
2815
|
knowsMarketplace = (configDir, marketplace) => isRecord(knownMarketplaces(configDir)[marketplace]);
|
|
2776
2816
|
}
|
|
2777
2817
|
});
|
|
@@ -4896,13 +4936,13 @@ var require_parse_options = __commonJS({
|
|
|
4896
4936
|
var require_identifiers = __commonJS({
|
|
4897
4937
|
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/identifiers.js"(exports, module) {
|
|
4898
4938
|
"use strict";
|
|
4899
|
-
var
|
|
4939
|
+
var numeric2 = /^[0-9]+$/;
|
|
4900
4940
|
var compareIdentifiers = (a, b) => {
|
|
4901
4941
|
if (typeof a === "number" && typeof b === "number") {
|
|
4902
4942
|
return a === b ? 0 : a < b ? -1 : 1;
|
|
4903
4943
|
}
|
|
4904
|
-
const anum =
|
|
4905
|
-
const bnum =
|
|
4944
|
+
const anum = numeric2.test(a);
|
|
4945
|
+
const bnum = numeric2.test(b);
|
|
4906
4946
|
if (anum && bnum) {
|
|
4907
4947
|
a = +a;
|
|
4908
4948
|
b = +b;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "forge-cw",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.15",
|
|
4
4
|
"description": "A visual dashboard for your coding agents on Claude Code, Codex, Pi or OpenCode. Installs CW for you.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -40,8 +40,8 @@
|
|
|
40
40
|
"@types/node": "^22.0.0",
|
|
41
41
|
"esbuild": "^0.25.0",
|
|
42
42
|
"typescript": "^5.8.0",
|
|
43
|
-
"@forge-dev/
|
|
44
|
-
"@forge-dev/
|
|
43
|
+
"@forge-dev/console": "0.1.0",
|
|
44
|
+
"@forge-dev/core": "0.1.0"
|
|
45
45
|
},
|
|
46
46
|
"scripts": {
|
|
47
47
|
"build": "tsc",
|